summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Tagliamonte <paultag@debian.org>2017-12-12 23:35:39 -0500
committerNiels Thykier <niels@thykier.net>2017-12-29 12:54:03 +0000
commit6bd40b18f8fbe69e2f5b0f3f2dd2795f78b2f042 (patch)
treefb835155abf88215481dd4937da661c226b989b9
parenta66a5dfe40ce23d585db0174f4f90adb072eeeb6 (diff)
downloaddebhelper-6bd40b18f8fbe69e2f5b0f3f2dd2795f78b2f042.tar.gz
Add DH_EXTRA_ADDONS env variable to specify local addons.
This is intended to be used by downstreams or specific local configurations that require a debhelper addon to be run during multiple builds without having to patch a large number of rules file. If at all possible, this should be avoided in favor of a --with flag in the rules file. Signed-off-by: Niels Thykier <niels@thykier.net>
-rw-r--r--debhelper.pod12
-rw-r--r--debian/changelog8
-rwxr-xr-xdh1
3 files changed, 20 insertions, 1 deletions
diff --git a/debhelper.pod b/debhelper.pod
index dd73c3f9..4cb18257 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -958,6 +958,18 @@ your package is built.
Multiple things to exclude can be separated with colons, as in
B<DH_ALWAYS_EXCLUDE=CVS:.svn>
+=item B<DH_EXTRA_ADDONS>
+
+If set, this adds the specified dh addons to be run in the appropriate places
+in the sequence of commands. This is equivalent to specifying the addon to run
+with the --with flag in the debian/rules file. Any --without calls specifying
+an addon in this environment variable will not be run.
+
+This is intended to be used by downstreams or specific local configurations
+that require a debhelper addon to be run during multiple builds without
+having to patch a large number of rules file. If at all possible, this should
+be avoided in favor of a --with flag in the rules file.
+
=back
=head1 SEE ALSO
diff --git a/debian/changelog b/debian/changelog
index e5628893..d49f2716 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,10 @@
-debhelper (11.0.1) UNRELEASED; urgency=medium
+debhelper (11.1) UNRELEASED; urgency=medium
+
+ [ Paul Tagliamonte ]
+ * dh: Provide the DH_EXTRA_ADDONS environment as a method for
+ e.g. derivatives to enable additional debhelper add-ons.
+ It is *not* a replacement for the --with parameter (which
+ package maintainers should still use). (Closes: #570935)
[ Hideki Yamane ]
* Fix typo of unnecessary. (Closes: #884574)
diff --git a/dh b/dh
index 3d268268..344d4e93 100755
--- a/dh
+++ b/dh
@@ -303,6 +303,7 @@ if (not compat(9, 1)) {
unshift(@ARGV, "--with=build-stamp");
}
+push @{$dh{WITH}},split(",", $ENV{DH_EXTRA_ADDONS});
inhibit_log();