Просмотр исходного кода

dpkg-genchanges: Do not warn when adding files w/o matching architecture

Fix undefined value useage when adding files w/o a matching architecture,
because they are not present in debian/control, this is most commonly the
case due to dpkg-distaddfile.
Guillem Jover лет назад: 15
Родитель
Сommit
9a5103c7bd
2 измененных файлов с 7 добавлено и 2 удалено
  1. 3 0
      debian/changelog
  2. 4 2
      scripts/dpkg-genchanges.pl

+ 3 - 0
debian/changelog

@@ -47,6 +47,9 @@ dpkg (1.16.0) UNRELEASED; urgency=low
     works at all. Thanks to Ivan Gagis <igagis@gmail.com>. LP: #728708
   * Add armhf support to ostable and triplettable. Closes: #594179
   * Set the modification time for unpacked symlinks on supported systems.
+  * Fix undefined value useage in dpkg-genchanges when adding files w/o a
+    matching architecture, because they are not present in debian/control,
+    this is most commonly the case due to dpkg-distaddfile.
 
   [ Raphaël Hertzog ]
   * Fail properly when debian/source/format is empty. Closes: #600854

+ 4 - 2
scripts/dpkg-genchanges.pl

@@ -466,8 +466,10 @@ $fields->{'Files'} = '';
 my %filedone;
 
 for my $f ($checksums->get_files(), @fileslistfiles) {
-    next if ($include == ARCH_DEP and debarch_eq('all', $p2arch{$f2p{$f}}));
-    next if ($include == ARCH_INDEP and not debarch_eq('all', $p2arch{$f2p{$f}}));
+    my $arch_all = debarch_eq('all', $p2arch{$f2p{$f}}) if defined($f2p{$f});
+
+    next if (defined($arch_all) && ($include == ARCH_DEP and $arch_all));
+    next if (defined($arch_all) && ($include == ARCH_INDEP and not $arch_all));
     next if $filedone{$f}++;
     my $uf = "$uploadfilesdir/$f";
     $checksums->add_from_file($uf, key => $f);