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

Seeking for advice: Circular Build Dependencies.



Hi,

I'm seeking for advice for how to handle this rather complicated
solution. I'm packaging a large software base that builds a number of
libraries and applications. In order to simplify things:

 - foo (source package) builds:
   - libfoo-dev, libfoo0, libfoo0-bin, ...
   - and build depends on libbar-dev

 - bar (source package) builds:
   - libbar-dev, libbar0, bar
   - and build depends on libfoo-dev

Obviously, there are circular build dependencies, which means that
neither package can be built without the other one.

One solution would be to throw all sources into a big source package and
build everything from that. This, however, is something that I'd really
like to avoid, because one of the two packages is really large, takes
hours to compile, and the whole thing would produce a really lot of
binary packages. I'm therefore seeking for a solution that allows me to
keep the sources separate.

My first guess would be to use alternative build dependencies. However,
this is problematic on the buildd network, because they will fail the
build if the first alternative is not installable.

Therefore, I've come up with this idea:

 - create a 'libbar-bootstrap' source package, which ship only headers
   -  that builds a libbar-boostrap-dev, which in turn provides: libbar-dev
 - build foo against libbar-boostrap-dev
 - build bar against libfoo-dev
 - build foo again, this time against libbar-dev

In my tests, it *seems* that apt indeed prefers a real package over a
virtual package. I'm aware of the following drawbacks:

 - needs an additional source package (libbar-boostrap) and uploads
 - versioned depends on libbar-dev (probably?) won't work anymore

My question now is:

 - has this approach been implemented in debian before?
 - do I miss something else here?

Thanks for your thoughts.


-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4


Reply to: