chiark / gitweb /
dgit: Transfer origs from .. to bpd when building
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 6 Jan 2019 16:30:13 +0000 (16:30 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 6 Jan 2019 16:30:13 +0000 (16:30 +0000)
commit6a15486772ae1aca46f196e6d2b46b30d82e4994
treeeae103b3c181777d3db6a8517119f7b561678852
parent9c71794454566244b7eaa528ead35b76cca40fc5
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 <ijackson@chiark.greenend.org.uk>
dgit