The following commit has been merged in the master branch:
commit 37934782af6acc04d6d171e339ef8a41c682cc98
Author: Guillem Jover <[email protected]>
Date: Wed Jul 18 03:09:20 2012 +0200
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 --.
diff --git a/debian/changelog b/debian/changelog
index 0a25d12..8489a35 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -102,6 +102,7 @@ dpkg (1.17.0) UNRELEASED; urgency=low
$SIG{__WARN__} to call usageerr() on option parse errors.
* Move the exit call out from usage() in dpkg-scansources so that usageerr()
gives a correct exit code. Thanks to Bernhard R. Link <[email protected]>.
+ * Print correct error message on unknown dpkg-name options before --.
[ Updated programs translations ]
* Fix typo in Spanish translation of update-alternatives.
diff --git a/scripts/dpkg-name.pl b/scripts/dpkg-name.pl
index c83221d..b01b2ba 100755
--- a/scripts/dpkg-name.pl
+++ b/scripts/dpkg-name.pl
@@ -243,6 +243,8 @@ while (@ARGV) {
move($_);
}
exit 0;
+ } elsif (m/^-/) {
+ usageerr(_g("unknown option \`%s'"), $_);
} else {
move($_);
}
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]