Debian Bug report logs - #666772
apt cross-build-dep handling should be liberal with Arch: all packages

version graph

Package: apt; Maintainer for apt is APT Development Team <deity@lists.debian.org>; Source for apt is src:apt.

Reported by: Steve Langasek <vorlon@debian.org>

Date: Sun, 1 Apr 2012 16:51:02 UTC

Severity: normal

Tags: patch

Found in version apt/0.8.16~exp12

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#666772; Package apt. (Sun, 01 Apr 2012 16:51:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steve Langasek <vorlon@debian.org>:
New Bug report received and forwarded. Copy sent to APT Development Team <deity@lists.debian.org>. (Sun, 01 Apr 2012 16:51:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Steve Langasek <vorlon@debian.org>
To: submit@bugs.debian.org
Subject: apt cross-build-dep handling should be liberal with Arch: all packages
Date: Sun, 1 Apr 2012 09:48:23 -0700
[Message part 1 (text/plain, inline)]
Package: apt
Version: 0.8.16~exp12
Severity: normal
Tags: patch
User: multiarch-devel@lists.alioth.debian.org
Usertags: multiarch

Hey guys,

While working on getting the Ubuntu base system's cross-build-dependencies
satisfiable using only apt-get build-dep -a $arch, I came to the realization
that the only Architecture: all package I'd seen being used as a
build-dependency that *couldn't* be marked Multi-Arch: foreign was
python-dev - and we had separately determined that python-dev needs to be
made an Architecture: any package precisely *because* other packages needed
to build-depend on the host version of python2.7-dev for cross-building.

And of course, unlike in the case of binary deps, there's no way that the
new build-dep behavior would accidentally pull in the wrong dependencies and
break a user's system on upgrade.  In both cases, an Architecture: all
package that masks a transitive arch-dependent dependency is *wrong*; but
whereas in the binary dep case we have to be very conservative in treating
that package the same way previous package managers would have (i.e.,
treating it like a native package), cross-build-dep handling is an entirely
new feature with no upgrade considerations - so it should be entirely
reasonable to treat all Arch: all packages as implicitly M-A: foreign when
satisfying cross-build-deps.


In support of this argument I'm attaching two bits of evidence:

 - arch-indep-build-deps.sh, that recurses through all the build-deps in the
   specified distro (here, Ubuntu) to generate a list of Arch: all packages
   that are used as build-dependencies.
 - arch-all-build-dep-list.txt, the sorted output of the above script.

This shows the scope of the problem; up to 1000 Arch: all packages that
might need to be marked M-A: foreign without this change, which may not need
any metadata updates with this change.  (Of course, this script doesn't
filter out build-deps of source packages that only build Architecture: all
binaries, so the actual number of packages affected may be somewhat lower.)


Finally, I'm attaching a patch that I believe implements the desired
behavior.  I've tested this locally, and it does the right thing in my
tests.  Example:

Before:

$ sudo apt-get build-dep -a armhf htmldoc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libjpeg-turbo8-dev:armhf' instead of 'libjpeg-dev:armhf'
Note, selecting 'libpng12-dev' instead of 'libpng-dev'
E: Build-Depends dependency for htmldoc cannot be satisfied because the package autoconf2.59 cannot be found
$

After:

$ sudo apt-get build-dep -a armhf htmldoc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libpng12-dev' instead of 'libpng-dev'
The following NEW packages will be installed:
  autoconf2.59 libdrm2:armhf libexpat1:armhf libfltk1.1:armhf
  libfltk1.1-dev:armhf libfontconfig1:armhf libfreetype6:armhf
  libgl1-mesa-glx:armhf libglapi-mesa:armhf libjpeg-dev libjpeg-turbo8:armhf
  libjpeg-turbo8-dev libjpeg8:armhf libjpeg8-dev libpng12-0:armhf libpng12-dev
  libssl-dev:armhf libssl1.0.0:armhf libx11-xcb1:armhf libxcb-glx0:armhf
  libxdamage1:armhf libxfixes3:armhf libxft2:armhf libxinerama1:armhf
  libxrender1:armhf libxxf86vm1:armhf zlib1g:armhf zlib1g-dev
  zlib1g-dev:armhf
The following packages will be upgraded:
  libssl1.0.0
1 upgraded, 29 newly installed, 0 to remove and 33 not upgraded.
Need to get 2134 kB/6199 kB of archives.
After this operation, 15.6 MB of additional disk space will be used.
Do you want to continue [Y/n]? ^C
$

Of note here is that libjpeg-dev is an Arch: all transitional package
depending on an Arch: any libjpeg8-dev, so apt doesn't get the answer
completely right - but as mentioned, the only way to fix that case is by
making libjpeg-dev not be Arch: all.

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org
[arch-indep-build-deps.sh (application/x-sh, attachment)]
[arch-all-build-dep-list.txt (text/plain, attachment)]
[build-deps-all-like-multiarch-foreign (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#666772; Package apt. (Fri, 06 Apr 2012 04:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steve Langasek <vorlon@debian.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Fri, 06 Apr 2012 04:30:02 GMT) Full text and rfc822 format available.

Message #10 received at 666772@bugs.debian.org (full text, mbox):

From: Steve Langasek <vorlon@debian.org>
To: 666772@bugs.debian.org
Subject: Re: apt cross-build-dep handling should be liberal with Arch: all packages
Date: Thu, 5 Apr 2012 21:26:40 -0700
[Message part 1 (text/plain, inline)]
Refined patch, now with test cases included.

This patch has been uploaded to Ubuntu for precise.

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org
[build-deps-all-like-multiarch-foreign (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#666772; Package apt. (Sat, 07 Apr 2012 09:42:11 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julian Andres Klode <jak@debian.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Sat, 07 Apr 2012 09:42:15 GMT) Full text and rfc822 format available.

Message #15 received at 666772@bugs.debian.org (full text, mbox):

From: Julian Andres Klode <jak@debian.org>
To: Steve Langasek <vorlon@debian.org>, 666772@bugs.debian.org
Subject: Re: Bug#666772: apt cross-build-dep handling should be liberal with Arch: all packages
Date: Sat, 7 Apr 2012 11:38:19 +0200
[Message part 1 (text/plain, inline)]
On Thu, Apr 05, 2012 at 09:26:40PM -0700, Steve Langasek wrote:
> Refined patch, now with test cases included.
> 
> This patch has been uploaded to Ubuntu for precise.

Have you talked to the dpkg developers about this? There is at
least dpkg-checkbuilddeps which checks build dependencies, and
I think dpkg also does build-time dependency handling in some
other tools. And as dpkg is one level lower than APT, I think
they should be asked first before doing something like this.

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
[Message part 2 (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 15:24:13 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.