summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debhelper.pod5
-rw-r--r--debian/changelog5
-rwxr-xr-xdh29
-rw-r--r--doc/TODO8
4 files changed, 32 insertions, 15 deletions
diff --git a/debhelper.pod b/debhelper.pod
index 2f44e4d..9191510 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -526,6 +526,11 @@ Also, libraries in unusual locations that dpkg-gensymbols would not
have processed before will be passed to it, a behavior change that
can cause some packages to fail to build.
+=item -
+
+dh requires the sequence to run be specified as the first parameter, and
+any switches come after it.
+
=back
=back
diff --git a/debian/changelog b/debian/changelog
index 6e2aced..4cbb1df 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-debhelper (7.4.21) UNRELEASED; urgency=low
+debhelper (7.9.1) UNRELEASED; urgency=low
* dh_installman: Support .so links relative to the current section.
* dh_installman: Avoid converting .so links to symlinks if the link
@@ -18,6 +18,9 @@ debhelper (7.4.21) UNRELEASED; urgency=low
(genesis) still uses them.
* dh_fixperms: Tighten globs used to find library .so files,
avoiding incorrectly matching things like "foo.sources". Closes: #583328
+ * In v8 mode, dh expects the sequence to run is always its first parameter.
+ This avoids ambiguities when parsing options to be passed on to debhelper
+ commands. (See #570039)
-- Joey Hess <joeyh@debian.org> Mon, 17 May 2010 20:01:19 -0400
diff --git a/dh b/dh
index a19a94a..8327b64 100755
--- a/dh
+++ b/dh
@@ -468,17 +468,31 @@ foreach my $addon (@{$dh{WITH}}) {
}
}
-# Get the sequence of commands to run.
-if (! @ARGV) {
+my $sequence;
+if (! compat(7)) {
+ # From v8, the sequence is the very first parameter.
+ $sequence=shift @ARGV_orig;
+ if ($sequence=~/^-/) {
+ error "Unknown sequence $sequence (options should not come before the sequence)";
+ }
+}
+else {
+ # Before v8, the sequence could be at any position in the parameters,
+ # so was what was left after parsing.
+ $sequence=shift;
+ if (defined $sequence) {
+ @ARGV_orig=grep { $_ ne $sequence } @ARGV_orig;
+ }
+}
+if (! defined $sequence) {
error "specify a sequence to run";
}
-my $sequence=shift;
if ($sequence eq 'debian/rules' ||
$sequence =~ /^override_dh_/) {
- # make -B causes the rules file to be run as a target
- # and support completly empty override targets
- exit 0
-}
+ # make -B causes the rules file to be run as a target.
+ # Also support completly empty override targets.
+ exit 0;
+}
elsif (! exists $sequences{$sequence}) {
error "Unknown sequence $sequence (choose from: ".
join(" ", sort keys %sequences).")";
@@ -506,7 +520,6 @@ elsif ($sequence eq 'binary-indep') {
}
while (@ARGV_orig) {
my $opt=shift @ARGV_orig;
- next if $opt eq $sequence;
if ($opt =~ /^--?(after|until|before|with|without)$/) {
shift @ARGV_orig;
next;
diff --git a/doc/TODO b/doc/TODO
index 4454753..1f50080 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -1,15 +1,11 @@
v8:
-* clean up dh's handling of options passed onto commands it calls,
- by implementing one of the changes discussed in #570039
- (either change #3, change #4, or change #5; change #0 was done, but
- was an incomplete workaround)
- My preference ATM is #3, require dh options come before --,
- and after, options to be passed on to commands.
* better package arch filtering for -N , -p (#576990)
* Support DEB_BUILD_OPTIONS=debug ; maybe also support passing
-g -O2 by default. See patch (and discussion of why this breaks
compatability) in #544844.
+* Reorder build systems list. perl_build before perl_makemaker.
+ Any other changes? #578805
v9: