diff options
author | Niels Thykier <niels@thykier.net> | 2017-07-23 09:43:38 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2017-07-23 09:47:19 +0000 |
commit | 16004f4e7d33a2303e5f1cc7461ba8dd0ca19c21 (patch) | |
tree | e8b51d6e1edaaee288b3d89f3f6eb5a37c96c67d /dh | |
parent | 063c761fda757ef24ff43f57911f4f461c8fd0dc (diff) | |
download | debhelper-16004f4e7d33a2303e5f1cc7461ba8dd0ca19c21.tar.gz |
dh: Rely on PROMISE NOOP to exclude dh_testdir
Turns out that some debhelper sequences try to inject themselves
*before* dh_testdir. Concretely, dh-di (--with d-i) being an example.
While I find the use rather questionable at first glance, I am not
going to break their code.
Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'dh')
-rwxr-xr-x | dh | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -370,9 +370,9 @@ if ($sequence eq 'debian/rules' || # Definitions of sequences. my $build_stamp_file = 'debian/debhelper-build-stamp'; my %sequences; -my @bd_minimal = compat(10) ? qw{ +my @bd_minimal = qw{ dh_testdir -} : (); +}; my @bd = (@bd_minimal, qw{ dh_update_autotools_config dh_auto_configure @@ -1041,6 +1041,7 @@ sub can_skip { } my @skipinfo=@{$skipinfo{$command}}; return 0 unless @skipinfo; + return 1 if scalar(@skipinfo) == 1 and $skipinfo[0] eq 'always-skip'; my $all_pkgs; foreach my $skipinfo (@skipinfo) { @@ -1080,9 +1081,10 @@ sub extract_skipinfo { foreach my $dir (split (':', $ENV{PATH})) { if (open (my $h, "<", "$dir/$command")) { while (<$h>) { - if (m/PROMISE: DH NOOP WITHOUT\s+(.*)/) { + if (m/PROMISE: DH NOOP( WITHOUT\s+(.*))?/) { close $h; - return split(' ', $1); + return split(' ', $2) if defined($2); + return ('always-skip'); } } close $h; |