Преглед на файлове

dpkg-name: Print correct error message on unknown options before --

Do not interpret unknown options as filenames, to then try to move them
and fail when not found. If the user wants to use a filename starting
with a dash, these should be passed after --.
Guillem Jover преди 14 години
родител
ревизия
37934782af
променени са 2 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 1 0
      debian/changelog
  2. 2 0
      scripts/dpkg-name.pl

+ 1 - 0
debian/changelog

@@ -102,6 +102,7 @@ dpkg (1.17.0) UNRELEASED; urgency=low
     $SIG{__WARN__} to call usageerr() on option parse errors.
     $SIG{__WARN__} to call usageerr() on option parse errors.
   * Move the exit call out from usage() in dpkg-scansources so that usageerr()
   * Move the exit call out from usage() in dpkg-scansources so that usageerr()
     gives a correct exit code. Thanks to Bernhard R. Link <brlink@debian.org>.
     gives a correct exit code. Thanks to Bernhard R. Link <brlink@debian.org>.
+  * Print correct error message on unknown dpkg-name options before --.
 
 
   [ Updated programs translations ]
   [ Updated programs translations ]
   * Fix typo in Spanish translation of update-alternatives.
   * Fix typo in Spanish translation of update-alternatives.

+ 2 - 0
scripts/dpkg-name.pl

@@ -243,6 +243,8 @@ while (@ARGV) {
             move($_);
             move($_);
         }
         }
         exit 0;
         exit 0;
+    } elsif (m/^-/) {
+        usageerr(_g("unknown option \`%s'"), $_);
     } else {
     } else {
         move($_);
         move($_);
     }
     }