path: root/dgit
diff options
authorIan Jackson <>2019-01-06 16:30:13 +0000
committerIan Jackson <>2019-01-06 16:30:13 +0000
commit6a15486772ae1aca46f196e6d2b46b30d82e4994 (patch)
treeeae103b3c181777d3db6a8517119f7b561678852 /dgit
parent9c71794454566244b7eaa528ead35b76cca40fc5 (diff)
dgit: Transfer origs from .. to bpd when building
This is apropos of #904878. When building we need to consider anything in .. that would be (accordingg to its filename) a possible orig for the package we are building, since we do not know what origs there are supposed to be, and missing ones generate unhelpful error messages. We `copy' things from .. to bpd, rather than just trying to use them directly from .., because otherwise lots of other things won't work right. For example, we might generate .dsc's in the bpd which expect the files alongside, but without the files. But we don't actually copy any files. We prefer to: * If the thing in .. is a symlink, copy the link text, adjusting it into an absolute link. * If the thing in .. is a file, try to hardlink it, or failing that make a symlink to it. The result is that we never duplicate the file contents, but still, where possible, we prefer to make the thing in bpd stand alone so that if the `copy' in .. is deleted everything is still fine. Signed-off-by: Ian Jackson <>
Diffstat (limited to 'dgit')
1 files changed, 3 insertions, 0 deletions
diff --git a/dgit b/dgit
index 21a3f28..e57f3ea 100755
--- a/dgit
+++ b/dgit
@@ -5852,6 +5852,9 @@ sub unpack_playtree_linkorigs ($$) {
# calls $fn->($leafname);
my $bpd_abs = bpd_abs();
+ dotdot_bpd_transfer_origs $bpd_abs, $upstreamversion, sub { 1 };
opendir QFD, $bpd_abs or fail "buildproductsdir: $bpd_abs: $!";
while ($!=0, defined(my $leaf = readdir QFD)) {
my $f = bpd_abs()."/".$leaf;