Source: dpkg
Severity: wishlist
Hi,
I want to make the case that it makes sense to let Architecture:all
packages satisfy :native build dependencies. We talked about this on IRC
but having a bug lets us not forget about all the arguments for either
side. Here are some reasons:
1. It is pointed out in multiple sources that Architecture:all packages
are treated as of the native architecture. With the current
behaviour, this is a lie. Instead one would always have to say:
"Architecture:all packages are treated as of the native architecture
expect that...". By removing this special casing we end up with less
exceptions and thus less surprises which I'd argue is a good thing.
2. The MultiarchCross spec [1] never forbids that Architecture:all
packages are able to satisfy :native build dependencies. In fact it
says:
":native" is appended to a build-dep to signify that it should be
installed for the build (i.e 'native') architecture rather than
the host architecture.
The ambiguity here is whether when it talks about "build" and "host"
architectures above, it means explicit architectures or also the
implicit architecture that Architecture:all packages provide. From
the MultiarchSpec [2] we read:
Architecture: all packages will, at least initially, be treated as
equivalent to packages of the native architecture for all
dependency resolution
What I want to show here is not that the multiarch spec mandates that
Architecture:all packages should satisfy :native build dependencies
(I can see the ambiguity in the texts above) but that making
Architecture:all packages satisfy :native dependencies does not
violate the spec.
3. Without allowing :native on Architecture:all packages, the affected
packages have to be converted to Architecture:any/Multi-Arch:same if
they cannot be marked as Multi-Arch:foreign.
4. dose3 and apt already allow Architecture:all packages to satisfy
:native build dependencies. To verify the claim, clone this git
repository:
https://gitlab.mister-muffin.de/josch/deb-m-a-dep-check.git
and test the appropriate dependency situation like this:
$ ./check.sh source none any all none no depends pkgb:native
# A A A A A A A A
# | | | | | | | |
# | | | | | | | +-- dependency on
pkgb:native
# | | | | | | +-- dependency not conflict
relationship
# | | | | | +-- multiarch value of pkgb
# | | | | +-- multiarch value of pkga (none
because it's a source package)
# | | | +-- architecture of pkgb
# | | +-- architecture of pkga
# | +-- what pkgb provides (none because it provides
nothing)
# +-- type of pkga (source because it's a source package with
build-depends)
the output will be:
source none any all none no depends pkgb:native 0 0 1
the last three numbers indicate that dose3 finds it satisfiable, apt
finds it satisfiable and dpkg finds it unsatisfiable (in that order).
Thus, if we decide that Architecture:all packages should satisfy
:native build dependencies, then only dpkg would have to change.
I'm looking forward to any arguments against this change. Guillem
pointed out that the arguments against :native being satisfied by
M-A:foreign [3] would apply here. But I do not see how this would be a
non-sensical relationship because for a package being Architecture:all
says nothing about whether their interface is architecture independent
or not. The field only says that the package has the same content across
all architectures and that the implicit architecture of the package
depends on the native architecture it is installed on.
Thanks!
cheers, josch
[1] https://wiki.ubuntu.com/MultiarchCross
[2]
https://wiki.ubuntu.com/MultiarchSpec#Dependencies_involving_Architecture:_all_packages
[3]
https://wiki.debian.org/Multiarch/MissingRationale#Why_do_M-A:foreign_packages_not_satisfy_:native_qualified_dependencies_in_build-dependencies.3F