Sfoglia il codice sorgente

dpkg-parsechangelog: Do not generate perl warnings on nonexistent fields

Guillem Jover 12 anni fa
parent
commit
78b91af405
2 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 2 0
      debian/changelog
  2. 1 1
      scripts/dpkg-parsechangelog.pl

+ 2 - 0
debian/changelog

@@ -17,6 +17,8 @@ dpkg (1.17.7) UNRELEASED; urgency=low
     - Switch test suite runner from ExtUtils::Command::MM to Test::Harness.
     - Enable colors in test suite runner.
     - Remove sequence number prefixes from test case filenames.
+  * Do not generate perl warnings on nonexistent fields with
+    «dpkg-parsechangelog --show».
 
   [ Updated dpkg translations ]
   * German (Sven Joachim).

+ 1 - 1
scripts/dpkg-parsechangelog.pl

@@ -128,7 +128,7 @@ my @fields = changelog_parse(%options);
 foreach my $f (@fields) {
     print "\n" if $count++;
     if ($fieldname) {
-        print $f->{$fieldname} . "\n";
+        print $f->{$fieldname} . "\n" if exists $f->{$fieldname};
     } else {
         print $f->output();
     }