path: root/dgit
diff options
authorIan Jackson <>2018-07-26 03:15:24 +0100
committerIan Jackson <>2018-07-26 04:34:49 +0100
commitcd7d1e9a3c0cc8d998cb375e1be1530efab8bb13 (patch)
treee7683f7a8f37c19be3b8a4fd274966611d86cafd /dgit
parent12a39369798685e87a0e67d528bc997eb71d7972 (diff)
dgit: Disregard *_multi.changes for .changes ambiguity purposes
The changes file ambiguity problem arises because dgit does not know what architecture changes file the build is going to generate. (To know that it would have to delve even more into the command line options the user is passing through dgit to the builder.) dgit --always-split-build generally makes a _multi.changes file, because it merges source changes with binaries from the build. We are going to make --always-split-build the only way things are done. This would result in lots more situations where --rm-old-changes is needed. However, actually, we can assume that the builder does not generate a *_multi.changes. That will allow us to spot the builder-generated changes file even if there is already a dgit-generated *_multi.changes file from a previous build. So: disregard _multi.changes, both when pre-checking for confusing files, and when actually figuring out what the build produced. Signed-off-by: Ian Jackson <>
Diffstat (limited to 'dgit')
1 files changed, 5 insertions, 2 deletions
diff --git a/dgit b/dgit
index 470c0fd..274f73a 100755
--- a/dgit
+++ b/dgit
@@ -6249,7 +6249,7 @@ sub postbuild_mergechanges ($) {
# or if that is undef, be a no-op.
# Returns the changes file to report to the user.
my $pat = changespat $version;
- my @changesfiles = glob $pat;
+ my @changesfiles = grep { !m/_multi\.changes/ } glob $pat;
@changesfiles = sort {
($b =~ m/_source\.changes$/ <=> $a =~ m/_source\.changes$/)
or $a cmp $b
@@ -6286,7 +6286,10 @@ sub midbuild_checkchanges () {
my $pat = changespat $version;
return if $rmchanges;
my @unwanted = map { s#.*/##; $_; } glob "$bpd_glob/$pat";
- @unwanted = grep { $_ ne changespat $version,'source' } @unwanted;
+ @unwanted = grep {
+ $_ ne changespat $version,'source' and
+ $_ ne changespat $version,'multi'
+ } @unwanted;
fail <<END
changes files other than source matching $pat already present; building would result in ambiguity about the intended results.
Suggest you delete @unwanted.