From ed209947d9e819c5950cf757751a570d1bd717c1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 6 Jan 2010 13:21:45 -0500 Subject: [PATCH] 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. --- Debian/Debhelper/Dh_Getopt.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 -- 2.39.2