diff options
authorIan Jackson <>2019-01-06 16:35:08 +0000
committerIan Jackson <>2019-01-06 16:35:08 +0000
commita44387b654d8d6a079efc16e76b23530ec7b651b (patch)
parent6a15486772ae1aca46f196e6d2b46b30d82e4994 (diff)
dgit: Transfer origs from .. to bpd when fetching
This is the second half of #904878. When fetching we want to avoid downloading once again origs that are already in `..', but not in bpd. So call the facility we now have for making clones of things from `..' to bpd. `..' might contain various junk. We try to treat it with a bit of suspicion. In particular, when we have a dsc we know exactly which orig files we are looking for. So only try to link those. We don't do this transfer for debian tarballs or diffs, or for origs that would be related according to their filenames, but aren't in the dsc. This maximises the probability that fetch will succeed even if there is garbage in the `..'. (Garbage in the `..' will sometimes unavoidably cause source builds to fail, because when doing a source build we don't know what origs to expect.) Closes: #904878 Signed-off-by: Ian Jackson <>
1 files changed, 3 insertions, 0 deletions
diff --git a/dgit b/dgit
index e57f3ea..68ccc42 100755
--- a/dgit
+++ b/dgit
@@ -2273,6 +2273,9 @@ sub generate_commits_from_dsc () {
my $upstreamv = upstreamversion $dsc->{version};
my @dfi = dsc_files_info();
+ dotdot_bpd_transfer_origs $bpd_abs, $upstreamv,
+ sub { grep { $_->{Filename} eq $_[0] } @dfi };
foreach my $fi (@dfi) {
my $f = $fi->{Filename};
die "$f ?" if $f =~ m#/|^\.|\.dsc$|\.tmp$#;