diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2010-01-06 13:55:53 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2010-01-06 13:56:58 -0500 |
commit | ed15bc2a33381f18113a95e2e855f4cfb82ee6e9 (patch) | |
tree | 08e18e9d2e989f608bd31b596d6ac523d37e0304 /Debian | |
parent | ed209947d9e819c5950cf757751a570d1bd717c1 (diff) | |
download | debhelper-ed15bc2a33381f18113a95e2e855f4cfb82ee6e9.tar.gz |
bring back ignore_unknown_options
Missed that dh still uses it.
Diffstat (limited to 'Debian')
-rw-r--r-- | Debian/Debhelper/Dh_Getopt.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm index fddbd89a..214fa2df 100644 --- a/Debian/Debhelper/Dh_Getopt.pm +++ b/Debian/Debhelper/Dh_Getopt.pm @@ -145,7 +145,7 @@ sub getoptions { } my $oldwarn; - if ($params{test}) { + if ($params{test} || $params{ignore_unknown_options}) { $oldwarn=$SIG{__WARN__}; $SIG{__WARN__}=sub {}; } @@ -155,13 +155,14 @@ sub getoptions { } foreach my $opt (@test) { - # Try to parse an option, but ignore it + # Try to parse an option, and skip it # if it is not known. - if (getoptions([$opt], %params, test => 1)) { + if (getoptions([$opt], test => 1)) { getoptions([$opt], %params); } } + return 1 if $params{ignore_unknown_options}; return $ret; } |