summaryrefslogtreecommitdiff
path: root/dh
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-11-02 22:48:01 -0400
committerJoey Hess <joey@kitenet.net>2010-11-02 22:51:33 -0400
commit76ef1cbd64829ee4a5156a5fc4b887bcba6b974f (patch)
treecbc302f73adbb037838d9c3923db194494a61d07 /dh
parente336ac5559c74e6b7b6282a9825963346dbd414b (diff)
dh: Inhibit logging for commands run inside override targets
Note that only the overridden command is inhibited. I wanted to avoid a behavior change if a rules file runs other debhelper commands inside the target, and relies on the logging preventing them being run later on in the sequence.
Diffstat (limited to 'dh')
-rwxr-xr-xdh9
1 files changed, 6 insertions, 3 deletions
diff --git a/dh b/dh
index f267a326..d2771abb 100755
--- a/dh
+++ b/dh
@@ -635,6 +635,9 @@ sub run {
# This passes the options through to commands called
# inside the target.
$ENV{DH_INTERNAL_OPTIONS}=join("\x1e", @options);
+ # Prevent commands called inside the target from
+ # logging.
+ $ENV{DH_INHIBIT_LOG}=$command;
$command="debian/rules";
@options="override_".$override_command;
}
@@ -669,9 +672,9 @@ sub run {
if (defined $override_command) {
delete $ENV{DH_INTERNAL_OPTIONS};
- # Need to handle logging for overriden commands here,
- # because the actual debhelper command may not have
- # been run by the rules file target.
+ delete $ENV{DH_INHIBIT_LOG};
+ # Update log for overridden command now that it has
+ # finished successfully.
# (But avoid logging for dh_clean since it removes
# the log earlier.)
if ($override_command ne 'dh_clean') {