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

dpkg-parsechangelog: Accept -S value in addition to -Svalue

Instead of rewording the man page and the --help output, just accept
what is to be expected from the documentation.

Closes: #766559
Guillem Jover пре 11 година
родитељ
комит
0196624315
2 измењених фајлова са 4 додато и 2 уклоњено
  1. 2 0
      debian/changelog
  2. 2 2
      scripts/dpkg-parsechangelog.pl

+ 2 - 0
debian/changelog

@@ -8,6 +8,8 @@ dpkg (1.17.21) UNRELEASED; urgency=low
   * Do not accept values bundled with long options in dpkg-parsechangelog.
     The parser was accepting things like «--count10», which is just broken.
     Instead allow only «--count=10» in addition to «--count 10».
+  * Accept «-S value» in addition to «-Svalue» in dpkg-parsechangelog.
+    Closes: #766559
 
   [ Updated programs translations ]
   * Catalan (Guillem Jover).

+ 2 - 2
scripts/dpkg-parsechangelog.pl

@@ -83,8 +83,8 @@ while (@ARGV) {
 	$options{changelogformat} = $1;
     } elsif (m/^-l(.+)$/) {
 	$options{file} = $1;
-    } elsif (m/^-S(.+)$/) {
-	$fieldname = $1;
+    } elsif (m/^-S(.+)?$/) {
+	$fieldname = $1 // shift;
     } elsif (m/^--show-field(?:=(.+))?$/) {
 	$fieldname = $1 // shift(@ARGV);
     } elsif (m/^--$/) {