[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to build circular dependant packages in debian



On 2021-09-18 14:17 +0530, open infra wrote:
>    Hi,
>    How build a package  A where it has a circular dependent package B (where
>    package B is depend on package A).

Once they are both in the archive it's not a problem. You just
specifiy the dependencies and build each against the version of the
other currently in the archive.

For the initial bootstrap you can use whatever local bootstrap is
expedient, then do binary uploads of one before a normal source upload
of the other.

It's a good idea to encode the bootstrap into the package dependencies
if you can, e.g. if a build excluding some feature removes the
circular dependency in a package, so you can do that minimal build of
A first, then build B then build 'full' A. This is what 'build
profiles' are for: https://wiki.debian.org/BuildProfileSpec

Doing this keeps debian bootstrappable for new architectures, and
helps you if you need to re-do the bootstrap of the pair again (e.g
due to major api changes in both packages together).

We don't have a way of doing a profiled build in the archive, but you
can upload a version of A that forces the minimal build (and doesn't
mention the 'B' dependency), let that build, then upload B and (once
built OK) upload a full A.

Sometimes people use 'foo-bootstrap' package names so that the
minimal and full versions of a package can be distinguished.

HTH

Wookey
-- 
Principal hats:  Linaro, Debian, Wookware, ARM
http://wookware.org/

Attachment: signature.asc
Description: PGP signature


Reply to: