Browse Source

dpkg-genchanges: Only add architectures for .deb/.udeb artifacts

When we are parsing filenames for artifacts that ressemble a known
package, we should not be assuming that the third basename _-separated
item is an architecture. Only consider it so for .deb and .udebs.
Guillem Jover 9 years ago
parent
commit
cae957871d
2 changed files with 3 additions and 3 deletions
  1. 2 0
      debian/changelog
  2. 1 3
      scripts/dpkg-genchanges.pl

+ 2 - 0
debian/changelog

@@ -60,6 +60,8 @@ dpkg (1.18.11) UNRELEASED; urgency=medium
   * Do substvar instantiation just once in dpkg-gencontrol.
   * Fix dpkg-gencontrol to not update the files list file (debian/files)
     when printing to STDOUT (via -O).
+  * Do not add architectures to .changes Architecture field for artifacts
+    that are not a .deb or .udeb in dpkg-genchanges.
   * Architecture support:
     - Add support for AIX operating system.
     - Add a version pseudo-field to the arch tables.

+ 1 - 3
scripts/dpkg-genchanges.pl

@@ -313,11 +313,9 @@ if (build_has_any(BUILD_BINARY)) {
         if (defined $file->{package} && $file->{package_type} =~ m/^u?deb$/) {
             $p2f{$file->{package}} //= [];
             push @{$p2f{$file->{package}}}, $file->{filename};
-        }
 
-        if (defined $file->{arch}) {
             push @archvalues, $file->{arch}
-                if $file->{arch} and not $archadded{$file->{arch}}++;
+                if defined $file->{arch} and not $archadded{$file->{arch}}++;
         }
     }
 }