On Sun, 20 Apr 2008, Roger Leigh wrote:
[snip]
I'm not sure why dpkg-genchanges fails here: I can run it with the
same version outside the chroot and it works fine. It may be a bug in
dpkg-buildpackage, but I'm not really sure about that.
Due to this problem, I haven't applied the patch as yet. Once this
bug can be fixed, I'll be happy to apply the patch. If you have any
idea what might be causing this, that would expedite merging this
change.
I spent a while tracking this down today. What actually happens is:
When you run sbuild, first dadadodo_1.04-3.dsc gets copied into the build
area. Then, dadadodo_1.04-3rleigh+b2.dsc (or whatever) gets generated.
Later, dpkg-genchanges runs, and strips off the +b2 from the version
number to find the source version number (see
/usr/share/perl5/Dpkg/Substvars.pm, search for source:version for the code
that does this; search for source:version in /usr/bin/dpkg-genchanges for
the code that calls from Dpkg::Substvars and also strips it a second
time), and looks there for the .dsc file. With just --binNMU specified,
it finds the original dadadodo_1.04-3.dsc, and you get the following
changes file.
$ /usr/bin/sbuild --make-binNMU=Test. --binNMU=2 --arch=i386 -d lenny -s -A
dadadodo_1.04-3.dsc
[...]
dadadodo_1.04-3+b2_i386.changes:
Format: 1.7
Date: Sun, 20 Apr 2008 22:24:01 -0400
Source: dadadodo (1.04-3)
Binary: dadadodo
Architecture: source i386
Version: 1.04-3+b2
[...]
5f4acf29927ff186d49406f5594e7032 529 text optional dadadodo_1.04-3.dsc
d3ff69c4e71c328586b1c6ca2130a4b3 22791 text optional dadadodo_1.04.orig.tar.gz
32adc2580ee7c16d717a7c297ef86fda 6007 text optional dadadodo_1.04-3.diff.gz
383bc8be167bb7b1d022794d779c9cff 23864 text optional
dadadodo_1.04-3+b2_i386.deb
Now, if you run sbuild with just --append-to-version, nothing is stripped
from the version number and it finds the newly generated
dadadodo_1.04-3rleigh.dsc file, with the changes shown below:
$ /usr/bin/sbuild --append-to-version=rleigh --arch=i386 -d lenny -s -A
dadadodo_1.04-3.dsc
[...]
dadadodo_1.04-3rleigh_i386.changes:
Format: 1.7
Date: Sun, 20 Apr 2008 22:29:26 -0400
Source: dadadodo
Binary: dadadodo
Architecture: source i386
Version: 1.04-3rleigh
[...]
94e6dbba39eaa591705e58f872740640 304 text optional dadadodo_1.04-3rleigh.dsc
d3ff69c4e71c328586b1c6ca2130a4b3 22791 text optional dadadodo_1.04.orig.tar.gz
09fa6c14102f3157bd20fab2a10f7778 6098 text optional
dadadodo_1.04-3rleigh.diff.gz
2935769a3a71c36670d6cb541c71d081 23832 text optional
dadadodo_1.04-3rleigh_i386.deb
However, if you run with both --binNMU and --append-to-version, sbuild is
looking for dadadodo_1.04-3rleigh.dsc while in fact there exist instead
dadadodo_1.04-3.dsc and dadadodo_1.04-3rleigh+b2.dsc, and finds neither.
So, everything would work here if one didn't ask for a source upload.
The easy "fix" would be to make "-s" and --append-to-version mutually
exclusive.
Ideally, the current mechanisms for getting the dadadodo_1.04-3.dsc file
would be modified to also support --append-to-version, but because they're
so remote from sbuild and are just removing everything from +b onwards, I
can't think of a reasonable way to do that. So, I'd go with some version
of the easy fix.
By the way, the patch is diffed against the latest version in our GIT
repository. You can get a copy with
% git clone git://git.debian.org/git/buildd-tools/sbuild.git sbuild
While diffs against earlier versions were fine in this case, it does
make things easier if patches are based against the master head.
Noted. Is there a good way to find the VC repositories for Debian
packages?
There is also a problem here in that sbuild does not clean up the
build directory and generated files in the chroot when
dpkg-buildpackage fails at this point. I'm thinking of adding a
temporary directory inside /build/$user for each build so that the
entire directory can be purged on failure.
Ahh, indeed, I only use sbuild with the LVM chroots, and thus wouldn't
notice this sort of issue. However, in debugging this I did discover that
even just --binNMU leaves behind dadadodo_1.04-3+b2.dsc and
dadadodo_1.04-3+b2.diff.gz.
-Tim Abbott
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]