]> git.donarmstrong.com Git - debhelper.git/commitdiff
In v8 mode, do not allow directly passing unknown options to debhelper commands....
authorJoey Hess <joey@kitenet.net>
Sun, 23 May 2010 23:12:50 +0000 (19:12 -0400)
committerJoey Hess <joey@kitenet.net>
Sun, 23 May 2010 23:12:50 +0000 (19:12 -0400)
Debian/Debhelper/Dh_Getopt.pm
Debian/Debhelper/Dh_Lib.pm
debhelper.pod
debian/changelog
debian/compat
dh
doc/TODO

index da145371103506fc33f6adf92c46a8a645e56146..257fe6493c8d6de61600dbf3c0f596837c7f5882 100644 (file)
@@ -218,8 +218,9 @@ sub parseopts {
 
        my $ret=getoptions(\@ARGV, %params);
        if (!$ret) {
-               warning("warning: unknown options will be a fatal error in a future debhelper release");
-               #error("unknown option; aborting");
+               if (! compat(7)) {
+                       error("unknown option; aborting");
+               }
        }
 
        # Check to see if -V was specified. If so, but no parameters were
index 09ec0b14fce358c26c4e69d008e2fb8c560e021d..63d1f65722e5e6b978f4d28b7d79f5dcd39181a8 100644 (file)
@@ -19,7 +19,7 @@ use vars qw(@ISA @EXPORT %dh);
            &sourcepackage
            &is_make_jobserver_unavailable &clean_jobserver_makeflags);
 
-my $max_compat=7;
+my $max_compat=8;
 
 sub init {
        my %params=@_;
index f09413a763ad7ad6ad7d880a711de04537c3a3f9..dae1a1a886a2b1f22d9e2c00aa66fe3e37a0f7b8 100644 (file)
@@ -505,6 +505,21 @@ none is specified.
 
 =back
 
+=item V8
+
+This mode is still under development. Using it in packages will cause them
+to probably break later.
+
+Changes from V7 are:
+
+=over 8
+
+=item -
+
+Commands will fail rather than warning when they are passed unknown options.
+
+=back
+
 =back
 
 =head2 udebs
index 8e68e130fd10ada42e3ec2c57b3092e2a9a34650..61890527b90c56ab632a884738efc5ab155cf50d 100644 (file)
@@ -5,6 +5,8 @@ debhelper (7.4.21) UNRELEASED; urgency=low
     target is not present in the same binary package, on advice of 
     Colin Watson. (To support eventual so search paths.)
   * Add deprecation warning for dh_clean -k.
+  * In v8 mode, do not allow directly passing unknown options to debhelper
+    commands. (Unknown options in DH_OPTIONS still only result in warnings.)
 
  -- Joey Hess <joeyh@debian.org>  Mon, 17 May 2010 20:01:19 -0400
 
index 7f8f011eb73d6043d2e6db9d2c101195ae2801f2..45a4fb75db864000d01701c0f7a51864bd4daabf 100644 (file)
@@ -1 +1 @@
-7
+8
diff --git a/dh b/dh
index 389afc29a96c0b2ae92964c7e85c9ab33550b8c8..a19a94a33eb276cd47e5056fa8e7bfedd26f2f25 100755 (executable)
--- a/dh
+++ b/dh
@@ -289,8 +289,8 @@ init(options => {
                "l" => \&list_addons,
                "list" => \&list_addons,
        },
-       # Disable complaints about unknown options; they are passed on the
-       # debhelper commands.
+       # Disable complaints about unknown options; they are passed on t
+       # the debhelper commands.
        ignore_unknown_options => 1,
        # Bundling does not work well since there are unknown options.
        bundling => 0,
index 42a25e380f4e376520a35193459a89e48613646d..89de90b8798dee60e4cfeb56efe7d98df9264865 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -13,7 +13,6 @@ v8:
   (either change #3, change #4, or change #5; change #0 was done, but 
   was an incomplete workaround)
 * better package arch filtering for -N , -p (#576990)
-* Convert warning about unknown command-line options back to an error.
 * Support DEB_BUILD_OPTIONS=debug ; maybe also support passing
   -g -O2 by default. See patch (and discussion of why this breaks
   compatability) in #544844.