diff options
author | Joey Hess <joey@kitenet.net> | 2010-05-23 19:12:50 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-05-23 19:12:50 -0400 |
commit | 00ed6d0cc8f74caf4a591152a97027194304383c (patch) | |
tree | e99542e2df021a4ae9af8ea6fd9f88ffa0e10878 | |
parent | 02fed65f218e1cb19feab24ac34c0c58b2b74aee (diff) | |
download | debhelper-00ed6d0cc8f74caf4a591152a97027194304383c.tar.gz |
In v8 mode, do not allow directly passing unknown options to debhelper commands. (Unknown options in DH_OPTIONS still only result in warnings.)
-rw-r--r-- | Debian/Debhelper/Dh_Getopt.pm | 5 | ||||
-rw-r--r-- | Debian/Debhelper/Dh_Lib.pm | 2 | ||||
-rw-r--r-- | debhelper.pod | 15 | ||||
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/compat | 2 | ||||
-rwxr-xr-x | dh | 4 | ||||
-rw-r--r-- | doc/TODO | 1 |
7 files changed, 24 insertions, 7 deletions
diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm index da145371..257fe649 100644 --- a/Debian/Debhelper/Dh_Getopt.pm +++ b/Debian/Debhelper/Dh_Getopt.pm @@ -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 diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm index 09ec0b14..63d1f657 100644 --- a/Debian/Debhelper/Dh_Lib.pm +++ b/Debian/Debhelper/Dh_Lib.pm @@ -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=@_; diff --git a/debhelper.pod b/debhelper.pod index f09413a7..dae1a1a8 100644 --- a/debhelper.pod +++ b/debhelper.pod @@ -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 diff --git a/debian/changelog b/debian/changelog index 8e68e130..61890527 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 diff --git a/debian/compat b/debian/compat index 7f8f011e..45a4fb75 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -7 +8 @@ -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 to + # the debhelper commands. ignore_unknown_options => 1, # Bundling does not work well since there are unknown options. bundling => 0, @@ -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. |