summaryrefslogtreecommitdiff
path: root/dh
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2013-05-09 10:34:16 -0400
committerJoey Hess <joey@kitenet.net>2013-05-09 10:34:16 -0400
commit136f0c7517ce5bffbbebec5bf710fc810510f3bd (patch)
treeaf26d27f229e262dab2b3f6815e9e0e56258c72a /dh
parentd934f613e9b584840e351f0a0e00e433cd7b466a (diff)
dh: As a workaround for anything not in debhelper that may rely on debhelper command that is now skipped creating the package build directory, the directory is created when a command is skipped. This workaround is disabled in compat level 10. Closes: #707336
Diffstat (limited to 'dh')
-rwxr-xr-xdh15
1 files changed, 14 insertions, 1 deletions
diff --git a/dh b/dh
index 9e5e5e2..7f81661 100755
--- a/dh
+++ b/dh
@@ -673,7 +673,20 @@ foreach my $i (0..$stoppoint) {
}
next unless @todo;
- next if can_skip($command, @todo) && ! $dh{NO_ACT};
+ if (can_skip($command, @todo) && ! $dh{NO_ACT}) {
+ # This mkdir is to avoid skipping the command causing
+ # breakage if some later command assumed that the
+ # command ran, and created the tmpdir, as a side effect.
+ # No commands in debhelper should make such an assuption,
+ # but there may be third party commands or other things
+ # in the rules file that does.
+ if (! compat(10)) {
+ foreach my $package (@todo) {
+ mkdir(tmpdir($package));
+ }
+ }
+ next;
+ }
# No need to run the command for any packages handled by the
# override targets.