diff options
author | Niels Thykier <niels@thykier.net> | 2017-07-23 12:35:38 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2017-10-28 13:32:59 +0000 |
commit | 52bf7ef7e0bb51ec088b8016109bb8751060906e (patch) | |
tree | b962987971e88d186b0f83e7abdb1f4f570fe87a | |
parent | 082c71b5341fd4b5e12ccb4ce9a438921f85ffad (diff) | |
download | debhelper-52bf7ef7e0bb51ec088b8016109bb8751060906e.tar.gz |
dh,dh_auto_*: Add NOOP promises
Signed-off-by: Niels Thykier <niels@thykier.net>
-rw-r--r-- | debian/changelog | 6 | ||||
-rwxr-xr-x | dh | 9 | ||||
-rwxr-xr-x | dh_auto_build | 2 | ||||
-rwxr-xr-x | dh_auto_clean | 2 | ||||
-rwxr-xr-x | dh_auto_configure | 2 | ||||
-rwxr-xr-x | dh_auto_install | 2 | ||||
-rwxr-xr-x | dh_auto_test | 2 |
7 files changed, 25 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 1ca42271..44eca59a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,13 +1,19 @@ debhelper (10.10.6) UNRELEASED; urgency=medium + [ Axel Beckert ] * Cleanup trailing whitespace in ancient debian/changelog entries and debian/rules. * Fix typo "belive" in debian/copyright and ancient debian/changelog entries. * Use HTTPS in debian/copyright format URL. + + [ Niels Thykier ] * Remove support for named compat levels. * dh_perl: Make dh_perl faster on packages with large doc directories by pruning the entire doc directory. + * dh,dh_auto_*: Support skipping all of the dh_auto_* helpers if the + package does not seem to have a build system (and there are no build + system related options passed to dh). -- Axel Beckert <abe@debian.org> Fri, 27 Oct 2017 23:48:44 +0200 @@ -582,6 +582,7 @@ my @packages=@{$dh{DOPACKAGES}}; # Filter out options intended only for this program. my @options; my $user_specified_options=0; +my $build_system_options = 0; if ($sequence eq 'build-arch' || $sequence eq 'install-arch' || $sequence eq 'binary-arch') { @@ -623,6 +624,7 @@ while (@ARGV_orig) { next if $max_parallel == 1; } push @options, "-O".$opt; + $build_system_options = 1 if $opt ne '--no-parallel' and $opt ne '--parallel'; $user_specified_options=1 unless $opt =~ /^--((?:no-)?parallel|buildsystem|sourcedirectory|builddirectory|)/; } @@ -1071,6 +1073,13 @@ sub can_skip { } # Use the secret bulk check call return 0 if pkgfile($pkgs, $need) ne ''; + } elsif ($type eq 'buildsystem') { + # If there are any buildsystem options, we assume that + # the build needs a buildsystem. + return 0 if $build_system_options; + require Debian::Debhelper::Dh_Buildsystems; + my $system = Debian::Debhelper::Dh_Buildsystems::load_buildsystem(undef, $need); + return 0 if defined($system); } else { # Unknown hint - make no assumptions return 0; diff --git a/dh_auto_build b/dh_auto_build index c189a216..a52ef98b 100755 --- a/dh_auto_build +++ b/dh_auto_build @@ -45,6 +45,8 @@ B<dh_auto_build> usually passes. =cut +# PROMISE: DH NOOP WITHOUT buildsystem(build) + buildsystems_init(); buildsystems_do(); diff --git a/dh_auto_clean b/dh_auto_clean index e71448ee..60f32ce5 100755 --- a/dh_auto_clean +++ b/dh_auto_clean @@ -46,6 +46,8 @@ B<dh_auto_clean> usually passes. =cut +# PROMISE: DH NOOP WITHOUT buildsystem(clean) + inhibit_log(); buildsystems_init(); buildsystems_do(); diff --git a/dh_auto_configure b/dh_auto_configure index 4bd1b368..9e10a169 100755 --- a/dh_auto_configure +++ b/dh_auto_configure @@ -50,6 +50,8 @@ B<dh_auto_configure> usually passes. For example: =cut +# PROMISE: DH NOOP WITHOUT buildsystem(configure) + buildsystems_init(); buildsystems_do(); diff --git a/dh_auto_install b/dh_auto_install index 6b34eb19..7080cc6b 100755 --- a/dh_auto_install +++ b/dh_auto_install @@ -71,6 +71,8 @@ buildsystems_init(options => { "destdir=s" => \$destdir, }); +# PROMISE: DH NOOP WITHOUT buildsystem(install) + # If destdir is not specified, determine it automatically if (!$destdir) { my @allpackages=getpackages(); diff --git a/dh_auto_test b/dh_auto_test index a64bb2dc..a59bc5dd 100755 --- a/dh_auto_test +++ b/dh_auto_test @@ -52,6 +52,8 @@ tests will be performed. =cut +# PROMISE: DH NOOP WITHOUT buildsystem(test) + if (get_buildoption("nocheck")) { exit 0; } |