Преглед изворни кода

dpkg-gencontrol: Add the correct filename to debian/files

When overriding the Package field, we have to take that into account
while generating the filename to add to debian/files, as the field
overrides happen after all field values have been computed.

Reported-by: Niels Thykier <niels@thykier.net>
Guillem Jover пре 11 година
родитељ
комит
1063e2e684
2 измењених фајлова са 4 додато и 1 уклоњено
  1. 3 0
      debian/changelog
  2. 1 1
      scripts/dpkg-gencontrol.pl

+ 3 - 0
debian/changelog

@@ -3,6 +3,9 @@ dpkg (1.18.2) UNRELEASED; urgency=low
   [ Guillem Jover ]
   * Fix plural form translations for single plural languages. Closes: #790025
   * Add new dpkg-buildpackage -J option, which is a safe version of -j.
+  * Fix dpkg-gencontrol to add correct binary filename to debian/files,
+    even when overriding the Package field value with the -D option.
+    Reported by Niels Thykier <niels@thykier.net>.
   * Perl modules:
     - Remove non-functional timezone name support from
       Dpkg::Changelog::Entry::Debian.

+ 1 - 1
scripts/dpkg-gencontrol.pl

@@ -328,7 +328,7 @@ if ($pkg_type eq 'udeb') {
 }
 
 my $sourcepackage = get_source_package();
-my $binarypackage = $fields->{'Package'};
+my $binarypackage = $override{'Package'} // $fields->{'Package'};
 my $verdiff = $binaryversion ne $sourceversion;
 if ($binarypackage ne $sourcepackage || $verdiff) {
     $fields->{'Source'} = $sourcepackage;