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

Bug#632221: Add cross-dependency satisfaction to apt

Package: apt
Severity: Wishlist

Now that multiarch is fully underway there is one significant
component missing for cross-building to be nicely supported:
resolving and installing cross-dependencies. 

Essentially we want to be able to say 

apt-get install build-dep -a <arch>

(the exact syntax is up to you guys, but I, Steve Langasek and mvogt
thought that was reasonable)

This page describes the extra aspects needed beyond the main multiarch
spec to support cross-build-dependencies:

The core of this page is that the multiarch status of a package
normally indicates whether the build arch or the cross arch
version of a package will satisfy a build-dep. However it's
not always correct, because whether a dep is 'native' or 'cross' is a
property of the _depending_ package (only it knows whether it is running
a binary or a linking a library in the depended-on package), and
Multi-Arch status is a property of the depended-on package. 

So the page specifies build-dep modifiers which allow the depending
package to say 'no I want something different from the default'. The table at
the bottom of the wiki page shows how that works, and I give some
metacode below for the logic (Which I think is right :-). We have
copied the :any meaning from the multiarch spec for 'Depends', and
added a :native 

The bottom of the page gives a table of which arch to install
according to Multi-Arch state and build-dep modifiers.

So the implementation work needed is 
1) to parse build-dep  modifiers  separated by a ':' (as for the existing
:any in Depends).  These will ultimately include all architecture
names, but currently we just allow :any and :native. 

2) take a -a arch specifier to set the host arch for installing
packages specified in build-deps. I don't believe APT::architecture is
sufficient because setting that will cause APT::architecture (i.e.
'host') arch packages to be installed for currently-uninstalled M-A:
foreign packages too, and we want build arch for those. 

We don't think this actually requires much work, as nearly everything
is as existing logic (including all install-deps of any build-deps
that get installed). The :any logic is the same as for Depends. So
only the :native extra restriction is new. 

Here is a page which provides some useful test cases:
It lists the declared build-deps of packages, and then which packages
actually need to be installed for the build arch and which for
the host arch. This should be useful for compiling test cases and
checking whether a cross-dependency-satisfaction tool works. 

I hope all that makes sense, don't hesitate to ask if you have

Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM

Reply to: