diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-06-12 00:27:04 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-06-12 00:27:04 -0400 |
commit | 69e898ae9f320e1bf812622e98c92f6949853b6e (patch) | |
tree | b03dd5c7e2b9d3f688dfc39a2a76c3bc07835533 | |
parent | 15a4917aa7ccfc33b99fd44ba8eb07ab431f81f7 (diff) | |
download | debhelper-69e898ae9f320e1bf812622e98c92f6949853b6e.tar.gz |
Allow command-specific options to be passed to commands via dh without causing other commands to emit a getopt warning or deprecation message.
-rw-r--r-- | Debian/Debhelper/Dh_Getopt.pm | 11 | ||||
-rw-r--r-- | debian/changelog | 8 |
2 files changed, 14 insertions, 5 deletions
diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm index 5585a54c..864b168e 100644 --- a/Debian/Debhelper/Dh_Getopt.pm +++ b/Debian/Debhelper/Dh_Getopt.pm @@ -155,11 +155,12 @@ sub parseopts { $ENV{DH_INTERNAL_OPTIONS}=~s/^\s+//; $ENV{DH_INTERNAL_OPTIONS}=~s/\s+$//; @ARGV_extra=split(/\s+/,$ENV{DH_INTERNAL_OPTIONS}); - my $ret=getoptions(\@ARGV_extra, $options); - if (!$ret) { - warning("warning: unknown options will be a fatal error in a future debhelper release"); - #error("unknown option; aborting"); - } + + # Unknown options will be silently ignored. + my $oldwarn=$SIG{__WARN__}; + $SIG{__WARN__}=sub {}; + getoptions(\@ARGV_extra, $options); + $SIG{__WARN__}=$oldwarn; # Avoid forcing acting on packages specified in # DH_INTERNAL_OPTIONS. This way, -p can be specified diff --git a/debian/changelog b/debian/changelog index 994ac442..c735e9d2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +debhelper (7.2.17) UNRELEASED; urgency=low + + * Allow command-specific options to be passed to commands + via dh without causing other commands to emit a getopt + warning or deprecation message. + + -- Joey Hess <joeyh@debian.org> Fri, 12 Jun 2009 00:26:11 -0400 + debhelper (7.2.16) unstable; urgency=low * dh_gconf: Add missed half of postrm fragment removal. Closes: #531035 |