summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-10 13:40:46 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-11 00:58:18 +0100
commitc6f06a4420584ef27db3510160c16c233f071c06 (patch)
tree757238d69c494f6f7b526e80cc201efe582a620b /dgit
parent0d948b7ca6205272838569aeeb3b5bb83f1b8f09 (diff)
dgit: Forbid source building with --include-dirty non-.. bpd
Right now, this does bizarre damage to .. Fixing this is very hard without bpd support in dpkg-source. Closes: #910725. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit18
1 files changed, 18 insertions, 0 deletions
diff --git a/dgit b/dgit
index 8cea07b..d443c34 100755
--- a/dgit
+++ b/dgit
@@ -6567,6 +6567,24 @@ sub build_source {
}
} else {
$leafdir = basename $maindir;
+
+ if ($buildproductsdir ne '..') {
+ # Well, we are going to run dpkg-source -b which consumes
+ # origs from .. and generates output there. To make this
+ # work when the bpd is not .. , we would have to (i) link
+ # origs from bpd to .. , (ii) check for files that
+ # dpkg-source -b would/might overwrite, and afterwards
+ # (iii) move all the outputs back to the bpd (iv) except
+ # for the origs which should be deleted from .. if they
+ # weren't there beforehand. And if there is an error and
+ # we don't run to completion we would necessarily leave a
+ # mess. This is too much. The real way to fix this
+ # is for dpkg-source to have bpd support.
+ confess unless $includedirty;
+ fail __
+ "--include-dirty not supported with --build-products-dir, sorry";
+ }
+
changedir '..';
}
runcmd_ordryrun_local @cmd, $leafdir;