From 6a15486772ae1aca46f196e6d2b46b30d82e4994 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 6 Jan 2019 16:30:13 +0000 Subject: 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 --- dgit | 3 +++ 1 file changed, 3 insertions(+) (limited to 'dgit') 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; -- cgit v1.2.3