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

Properly warn on unknown fields in dpkg-genchanges

Explicitely ignore all known fields from the control file source package
stanza in dpkg-genchanges, instead of leaving unknown fields unwarned.
Guillem Jover пре 19 година
родитељ
комит
bf730717d9
3 измењених фајлова са 12 додато и 1 уклоњено
  1. 6 0
      ChangeLog
  2. 2 0
      debian/changelog
  3. 4 1
      scripts/dpkg-genchanges.pl

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2007-08-31  Guillem Jover  <guillem@debian.org>
+
+	* scripts/dpkg-genchanges.pl: Do not leave unknown fields unwarned
+	and explicitely ignore all known ones from control file source
+	package stanza.
+
 2007-08-30  Guillem Jover  <guillem@debian.org>
 
 	* scripts/dpkg-genchanges.pl: Ignore XB- fields instead of XC- fields

+ 2 - 0
debian/changelog

@@ -40,6 +40,8 @@ dpkg (1.14.6) UNRELEASED; urgency=low
   * Implement support for Homepage field. Closes: #142324
   * Ignore XB- fields instead of XC- fields from control file binary package
     stanzas in dpkg-genchanges.
+  * Explicitely ignore all known fields from the control file source package
+    stanza in dpkg-genchanges, instead of leaving unknown fields unwarned.
 
   [ Updated scripts translations ]
   * French (Frédéric Bothamy, Christian Perrier).

+ 4 - 1
scripts/dpkg-genchanges.pl

@@ -208,7 +208,10 @@ for $_ (keys %fi) {
 	elsif (m/^Section$|^Priority$/i) { $sourcedefault{$_}= $v; }
 	elsif (m/^Maintainer$/i) { $f{$_}= $v; }
 	elsif (s/^X[BS]*C[BS]*-//i) { $f{$_}= $v; }
-	elsif (m/|^X[BS]+-|^Standards-Version$|^Homepage$/i) { }
+	elsif (m/^X[BS]+-/i ||
+	       m/^Build-(Depends|Conflicts)(-Indep)?$/i ||
+	       m/^(Standards-Version|Uploaders|Homepage|Origin|Bugs)$/i) {
+	}
 	else { &unknown(_g('general section of control info file')); }
     } elsif (s/^C(\d+) //) {
 	my $i = $1;