summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-05-23 19:12:50 -0400
committerJoey Hess <joey@kitenet.net>2010-05-23 19:12:50 -0400
commit00ed6d0cc8f74caf4a591152a97027194304383c (patch)
treee99542e2df021a4ae9af8ea6fd9f88ffa0e10878
parent02fed65f218e1cb19feab24ac34c0c58b2b74aee (diff)
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.pm5
-rw-r--r--Debian/Debhelper/Dh_Lib.pm2
-rw-r--r--debhelper.pod15
-rw-r--r--debian/changelog2
-rw-r--r--debian/compat2
-rwxr-xr-xdh4
-rw-r--r--doc/TODO1
7 files changed, 24 insertions, 7 deletions
diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm
index da14537..257fe64 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 09ec0b1..63d1f65 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 f09413a..dae1a1a 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 8e68e13..6189052 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 7f8f011..45a4fb7 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+8
diff --git a/dh b/dh
index 389afc2..a19a94a 100755
--- 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 to
+ # the debhelper commands.
ignore_unknown_options => 1,
# Bundling does not work well since there are unknown options.
bundling => 0,
diff --git a/doc/TODO b/doc/TODO
index 42a25e3..89de90b 100644
--- 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.