summaryrefslogtreecommitdiff
path: root/dh
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-01-04 16:06:08 -0500
committerJoey Hess <joey@gnu.kitenet.net>2010-01-04 16:06:08 -0500
commit09d21e9f004aabe6a409c981c8d11e7cb4c2051f (patch)
tree1a5a1095251b09f87028f5be68e6eee3642a4ebd /dh
parent9afe080c5ee27e6e9170d09c9dc5c72cccbdc27e (diff)
Fix warning about unknown options passed to commands in override targets.
dh used DH_OVERRIDE_UNKNOWN_OPTIONS, which was too broad as it affected commands run via override targets and caused there to be no warning about unknown options. Now unknown options are only ignored when parsing DH_INTERNAL_OPTIONS and dh's own options.
Diffstat (limited to 'dh')
-rwxr-xr-xdh38
1 files changed, 19 insertions, 19 deletions
diff --git a/dh b/dh
index c90cf0e..96a6b84 100755
--- a/dh
+++ b/dh
@@ -220,29 +220,29 @@ my @ARGV_orig=@ARGV;
# (and comes first so python-central loads later and can disable it).
unshift @ARGV, "--with=python-support";
-# Disable complaints about unknown options for both dh and the commands
-# it runs. This is done because dh accepts and passes on options that may
-# be specific to only some debhelper commands.
-$ENV{DH_IGNORE_UNKNOWN_OPTIONS}=1;
-
init(options => {
- "until=s" => \$dh{UNTIL},
- "after=s" => \$dh{AFTER},
- "before=s" => \$dh{BEFORE},
- "remaining" => \$dh{REMAINING},
- "with=s" => sub {
- my ($option,$value)=@_;
- push @{$dh{WITH}},split(",", $value);
- },
- "without=s" => sub {
- my ($option,$value)=@_;
- @{$dh{WITH}} = grep { $_ ne $value } @{$dh{WITH}};
+ "until=s" => \$dh{UNTIL},
+ "after=s" => \$dh{AFTER},
+ "before=s" => \$dh{BEFORE},
+ "remaining" => \$dh{REMAINING},
+ "with=s" => sub {
+ my ($option,$value)=@_;
+ push @{$dh{WITH}},split(",", $value);
+ },
+ "without=s" => sub {
+ my ($option,$value)=@_;
+ @{$dh{WITH}} = grep { $_ ne $value } @{$dh{WITH}};
+ },
+ "l" => \$dh{LIST},
+ "list" => \$dh{LIST},
},
- "l" => \$dh{LIST},
- "list" => \$dh{LIST},
-});
+ # Disable complaints about unknown options; they are passed on the
+ # debhelper commands.
+ ignore_unknown_options => 1,
+);
inhibit_log();
+
# If make is using a jobserver, but it is not available
# to this process, clean out MAKEFLAGS. This avoids
# ugly warnings when calling make.