[Multiarch-devel] multiarch cross build dependency resolution

Colin Watson cjwatson at debian.org
Mon Jan 4 12:21:47 UTC 2016


On Sun, Jan 03, 2016 at 09:40:28PM +0100, Johannes Schauer wrote:
> in #809730 Niko Tyni made me aware that sbuild is using 'apt-get build-dep' to
> resolve cross build dependencies. This feature seems to originate in a commit
> by Wookey [1] and later by Colin Watson [2]. I'd like to get rid of it and my
> question is why 'apt-get build-dep' was used in the first place?
> 
> As far as my understanding of multiarch goes, letting sbuild generate a dummy
> binary package of the host architecture depending on the build dependencies
> which were properly mangled by Dpkg::Deps::deps_parse() and telling apt to
> install that binary package should be sufficient, no?
> 
> Unfortunately, commit messages and code comments do not tell me why 'apt-get
> build-dep' was used if hostarch != buildarch.
> 
> What am I missing?
> 
> What prevents a dummy package being used instead as it is done in the native
> case?

See https://bugs.debian.org/697298.  Using "apt-get install" rather than
"apt-get build-dep" fails to handle ":native" qualifiers on
build-dependencies.  Those are disallowed in Depends but allowed in
Build-Depends, so mangling Build-Depends into Depends is a bad idea in
cases where these particular semantics are important.  Please don't get
rid of this change - it's useful.

The native and cross paths differ only because I was being conservative
about changing things.  If you're working on this anyway, I'd prefer us
to switch to the build-dep approach across the board.  I have a to-do
note in my local copy to check whether both --resolve-alternatives and
--no-resolve-alternatives work properly with that, though.

Now, regarding your problem at hand in #809730, this shouldn't get in
your way.  Even when using build-dep, sbuild should still use its dummy
archive; the difference is merely whether it uses the Packages or
Sources file it generates.  It would be worth checking whether the
Sources file is being generated properly.

-- 
Colin Watson                                       [cjwatson at debian.org]



More information about the Multiarch-devel mailing list