ソースを参照

dpkg-gencontrol: fix handling of "old-style" bin-nmus

With old style bin-nmus, the source version is extrapolated from the
binary version and thus we need to retrieve the correct source version
from Dpkg::Substvars instead of assuming that what we submitted has
been unchanged.

Regression introduced in commit 094d3a7e61e6fc1f5634d880957d18ed70954a60.

Reported-by: Julien Cristau <jcristau@debian.org>
Closes: #679959
Raphaël Hertzog 14 年 前
コミット
c140193701
共有2 個のファイルを変更した8 個の追加0 個の削除を含む
  1. 4 0
      debian/changelog
  2. 4 0
      scripts/dpkg-gencontrol.pl

+ 4 - 0
debian/changelog

@@ -3,6 +3,10 @@ dpkg (1.16.7) UNRELEASED; urgency=low
   [ Guillem Jover ]
   * Fix bogus dpkg-query --control-show badusage() strings.
 
+  [ Raphaël Hertzog ]
+  * Fix dpkg-gencontrol to correctly compute the source version
+    in the case of "old-style" bin-nmus. Closes: #679959
+
   [ Updated dselect translations ]
   * Catalan (Guillem Jover).
   * French (Christian Perrier).

+ 4 - 0
scripts/dpkg-gencontrol.pl

@@ -161,6 +161,10 @@ $substvars->load("debian/substvars") if -e "debian/substvars" and not $substvars
 my $control = Dpkg::Control::Info->new($controlfile);
 my $fields = Dpkg::Control->new(type => CTRL_PKG_DEB);
 
+# Old-style bin-nmus change the source version submitted to
+# set_version_substvars()
+$sourceversion = $substvars->get("source:Version");
+
 my $pkg;
 
 if (defined($oppackage)) {