Bug#753657: mk-build-deps: -i broken

Jan Braun janbraun at gmx.net
Sun Jul 6 15:39:26 UTC 2014


James McCoy schrob:
> It is and it isn't. :)

True :)
It's working iff the newest version of the package is available
from only one source.

Since my system is running testing, but also has unstable and
experimental (and testing-security) in its sources.list, this means
mk-build-deps -i only works for packages that have a newer version in
sid or experimental.

> For some reason, “apt-cache showsrc polipo” listed the same stanza
> twice, so we built two polipo-build-deps_1.1.1-1_all.deb packages.

Doh. Sorry for missing that.

> Can
> you show what “apt-cache showsrc polipo” and “apt-cache policy polipo”
> output?

Sure:

| $ apt-cache showsrc polipo
| Package: polipo
| Binary: polipo
| Version: 1.1.1-1
| Maintainer: Rolf Leggewie <foss at rolf.leggewie.biz>
| Uploaders: Donovan Baarda <abo at minkirri.apana.org.au>
| Build-Depends: debhelper (>= 9), texinfo
| Architecture: any
| Standards-Version: 3.9.5
| Format: 3.0 (quilt)
| Files:
|  988d48eb7b00432e2650aabd7cfc0e7a 1875 polipo_1.1.1-1.dsc
|  86939e331e656f638271f578b6e3f893 182891 polipo_1.1.1.orig.tar.gz
|  b014f148b29e6540740bd34dacf6e08b 11744 polipo_1.1.1-1.debian.tar.xz
| Vcs-Browser: http://git.debian.org/?p=collab-maint/polipo.git
| Vcs-Git: git://git.debian.org/git/collab-maint/polipo.git
| Checksums-Sha1:
|  190276f31a2ed4526657c1b26117432ca5ec1917 1875 polipo_1.1.1-1.dsc
|  cf7461a96c4bf012496844d5a54171182c2cb1a7 182891 polipo_1.1.1.orig.tar.gz
|  a2f4a5748f61333e96c3f1f0d9cb0ef39462ddc7 11744 polipo_1.1.1-1.debian.tar.xz
| Checksums-Sha256:
|  ae9a90eafbe5d0e2c02ec9f09fc126f7a21db8a7949f787ec6b9813a01533bc2 1875 polipo_1.1.1-1.dsc
|  a259750793ab79c491d05fcee5a917faf7d9030fb5d15e05b3704e9c9e4ee015 182891 polipo_1.1.1.orig.tar.gz
|  9899c5a7157a3cb2fcbcae03cbc6f3812733c5cdf2beca59584784998bab97a3 11744 polipo_1.1.1-1.debian.tar.xz
| Homepage: http://www.pps.jussieu.fr/~jch/software/polipo/
| Package-List: 
|  polipo deb web optional arch=any
| Directory: pool/main/p/polipo
| Priority: source
| Section: web
| 
| Package: polipo
| Binary: polipo
| Version: 1.1.1-1
| Maintainer: Rolf Leggewie <foss at rolf.leggewie.biz>
| Uploaders: Donovan Baarda <abo at minkirri.apana.org.au>
| Build-Depends: debhelper (>= 9), texinfo
| Architecture: any
| Standards-Version: 3.9.5
| Format: 3.0 (quilt)
| Files:
|  988d48eb7b00432e2650aabd7cfc0e7a 1875 polipo_1.1.1-1.dsc
|  86939e331e656f638271f578b6e3f893 182891 polipo_1.1.1.orig.tar.gz
|  b014f148b29e6540740bd34dacf6e08b 11744 polipo_1.1.1-1.debian.tar.xz
| Vcs-Browser: http://git.debian.org/?p=collab-maint/polipo.git
| Vcs-Git: git://git.debian.org/git/collab-maint/polipo.git
| Checksums-Sha1:
|  190276f31a2ed4526657c1b26117432ca5ec1917 1875 polipo_1.1.1-1.dsc
|  cf7461a96c4bf012496844d5a54171182c2cb1a7 182891 polipo_1.1.1.orig.tar.gz
|  a2f4a5748f61333e96c3f1f0d9cb0ef39462ddc7 11744 polipo_1.1.1-1.debian.tar.xz
| Checksums-Sha256:
|  ae9a90eafbe5d0e2c02ec9f09fc126f7a21db8a7949f787ec6b9813a01533bc2 1875 polipo_1.1.1-1.dsc
|  a259750793ab79c491d05fcee5a917faf7d9030fb5d15e05b3704e9c9e4ee015 182891 polipo_1.1.1.orig.tar.gz
|  9899c5a7157a3cb2fcbcae03cbc6f3812733c5cdf2beca59584784998bab97a3 11744 polipo_1.1.1-1.debian.tar.xz
| Homepage: http://www.pps.jussieu.fr/~jch/software/polipo/
| Package-List: 
|  polipo deb web optional arch=any
| Directory: pool/main/p/polipo
| Priority: source
| Section: web
| 
| $ apt-cache policy polipo
| polipo:
|   Installed: 1.1.1-1
|   Candidate: 1.1.1-1
|   Version table:
|  *** 1.1.1-1 0
|         550 http://ftp.de.debian.org/debian/ unstable/main amd64 Packages
|         800 http://ftp.de.debian.org/debian/ testing/main amd64 Packages
|         100 /var/lib/dpkg/status
| $ 
[Both polipo descriptions from apt-cache showsrc are exactly the same.]

I've been poking at apt-cache showsrc and come to the conclusion that it
just outputs matching entries in the /var/lib/apt/lists/*Sources files.
For example, adding an additional mirror to sources.list and running
"apt-get update" added a third identical copy of the polipo description.
And for xmonad, there's one stanza for version 0.11-6 , which nobody
else seems to bother to mention:

| $ apt-cache policy xmonad
| xmonad:
|   Installed: 0.11-7+b1
|   Candidate: 0.11-7+b1
|   Version table:
|      0.11-8 0
|         550 http://ftp.de.debian.org/debian/ unstable/main amd64 Packages
|  *** 0.11-7+b1 0
|         800 http://ftp.de.debian.org/debian/ testing/main amd64 Packages
|         100 /var/lib/dpkg/status
| $ apt-cache showsrc xmonad | grep ^Version
| Version: 0.11-6
| Version: 0.11-8
| Version: 0.11-7
| $ 

The reference to 0.11-6 comes from
/var/lib/apt/lists/ftp.de.debian.org_debian_dists_unstable_main_source_Sources
, which for some reason lists both xmonad 0.11-6 and 0.11-8 .

So apt-cache showsrc seems to be a too low-level interface to use without
postprocessing.


> The way we generate the arguments is by globbing for debs matching the
> package that was just created (polipo-build-deps_*.deb).  In this case,
> since we gave it the same argument, it appears to have triggered the
> "return undef when (matching) list is exhausted".
> 
> That can easily be handled by checking for undef,

That seems very brittle to me. If I have several versions of a package,
then I might do something like

| $ mk-build-deps -i foo-2.0.0/debian/control
| $ [hack stuff, time passes]
| $ mk-build-deps -i foo-1.2.3/debian/control
| $ [expect the b-d for 1.2.3 to be satisfied]

But the second m-b-d call will involuntarily also pick up the
foo-build-deps_2.0.0_all.deb that's still lying around, and dpkg will
happily unpack 1.2.3 and then immediately replace it by the 2.0.0 that
comes after it on the command line.

I think you do have the version already extracted, can't you predict the
full filename? Or at least glob for $PACKAGE-build-deps_$VERSION*.deb if
the architecture suffix is a problem?


> but the bigger
> question is why we thought we had to create two of the same package.

Well, because apt-get showsrc doesn't think at all. ;)

regards,
    Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/devscripts-devel/attachments/20140706/d3c7091f/attachment.sig>


More information about the devscripts-devel mailing list