Package: sbuild
Version: 0.62.6-1
Hi Roger,
As you saw on #debian-devel about a week ago, Paul Wise noticed (as a
result of running the debian-derivatives analysis scripts on Debathena,
which uses --append-to-version for all builds) that builds with
--append-to-version do not correctly report the original/source package
version number in the Source: field of the binary control file and binary
.changes file. Namely, the field is expected to contain something of the
form "package (1.0)", not just "package", if the resulting binary package
is not version 1.0. This works fine for sbuild's --binNMU option -- the
binary package will be version e.g. 1.0+b1, but contain a Source: field of
"package (1.0)".
On tracking this down a little further (and noticing that
--append-to-version=+b2 did not exhibit this bug), I found that when
dpkg-source generates substvars (in Dpkg::Substvar), it uses the following
logic:
sub set_version_substvars {
my ($self, $version) = @_;
$self->{'vars'}{'binary:Version'} = $version;
$self->{'vars'}{'source:Version'} = $version;
$self->{'vars'}{'source:Version'} =~ s/\+b[0-9]+$//;
[...]
}
So the source:Version field is only correct when the binary version
happens to end with a +bNNN (or when it is the same as the source version,
of course). So sbuild did not need to specifically do anything about
source:Version when --binNMU was the only option that changed the binary
version from the source version, but this assumption is no longer true
with --append-to-version.
I'm not sure what the right way to fix this is. Possibly sbuild itself
should edit debian/substvars to change the source:Version field. I can't
get --dpkg-source-opt=-Vsource:Version=1.0 to work, although maybe
dpkg-source getting run before "Hack binNMU version" is relevant. Possibly
dpkg-source gaining an option to be explicitly told the source package
version is the most-right answer here, but would require changes in both
sbuild and dpkg-dev.
--
Geoffrey Thomas
geo...@mit.edu
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org