From: Joey Hess Date: Wed, 6 Jan 2010 18:21:45 +0000 (-0500) Subject: fix bad interaction between -O and ignore_unknown_options X-Git-Tag: 7.4.12~9 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ed209947d9e819c5950cf757751a570d1bd717c1;p=debhelper.git fix bad interaction between -O and ignore_unknown_options Actually, since ignore_unknown_options is only used with DH_INTERNAL_OPTIONS, which always uses -O for such options, I was able to remove that complication too. --- diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm index f27775b..fddbd89 100644 --- a/Debian/Debhelper/Dh_Getopt.pm +++ b/Debian/Debhelper/Dh_Getopt.pm @@ -145,7 +145,7 @@ sub getoptions { } my $oldwarn; - if ($params{test} || $params{ignore_unknown_options}) { + if ($params{test}) { $oldwarn=$SIG{__WARN__}; $SIG{__WARN__}=sub {}; } @@ -162,7 +162,6 @@ sub getoptions { } } - return 1 if $params{ignore_unknown_options}; return $ret; } @@ -182,7 +181,7 @@ sub parseopts { # dh through an override target to a command. if (defined $ENV{DH_INTERNAL_OPTIONS}) { @ARGV_extra=split(/\x1e/, $ENV{DH_INTERNAL_OPTIONS}); - getoptions(\@ARGV_extra, %params, ignore_unknown_options => 1); + getoptions(\@ARGV_extra, %params); # Avoid forcing acting on packages specified in # DH_INTERNAL_OPTIONS. This way, -p can be specified