]> git.donarmstrong.com Git - debhelper.git/commitdiff
Allow command-specific options to be passed to commands via dh without causing other...
authorJoey Hess <joey@gnu.kitenet.net>
Fri, 12 Jun 2009 04:27:04 +0000 (00:27 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Fri, 12 Jun 2009 04:27:04 +0000 (00:27 -0400)
Debian/Debhelper/Dh_Getopt.pm
debian/changelog

index 5585a54ceca1f8b6efcb595ac2c694762a10fcef..864b168ea74dd5a5b48c8fb9afe2e926edf0f938 100644 (file)
@@ -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
index 994ac4426517096bf553e1558d221ba0136e1159..c735e9d235b506d43d0aa95c3ccbf9316b75c337 100644 (file)
@@ -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