]> git.donarmstrong.com Git - debhelper.git/commitdiff
fix bad interaction between -O and ignore_unknown_options
authorJoey Hess <joey@gnu.kitenet.net>
Wed, 6 Jan 2010 18:21:45 +0000 (13:21 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Wed, 6 Jan 2010 18:21:45 +0000 (13:21 -0500)
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

index f27775b47823833e47ae3c3f65e76db1798e33fd..fddbd89a28dd9ba99f20cd96166c58e48e140d64 100644 (file)
@@ -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