From: Ian Jackson Date: Fri, 6 Nov 2015 14:23:18 +0000 (+0000) Subject: sbuild: Rename the used-up .changes files to `.inmulti' X-Git-Tag: archive/debian/2.0~367 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=bab78c63a571a3e1b9e87acedd7e6ea40c835da2;hp=c2320e3c4c99e74d80f029be8ca8c0d06d82d67c;p=dgit.git sbuild: Rename the used-up .changes files to `.inmulti' This avoids accidental use of the wrong one (by software, or by users). --- diff --git a/debian/changelog b/debian/changelog index 984e6cb1..a9c6e9e4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,7 +9,9 @@ dgit (1.5~~) unstable; urgency=medium New checks and improved behaviours: * In dgit sbuild, check that the set of .changes files found is as we - expect, before calling mergechanges + expect, before calling mergechanges, and rename the used-up .changes + files to `.inmulti' to avoid accidental use of the wrong one (by + software, or by users). Bugfixes: * When cleaning up after failed clone, stat the to-be-cleaned-up diff --git a/dgit b/dgit index 32eaa2a8..a4dea9b4 100755 --- a/dgit +++ b/dgit @@ -3158,6 +3158,10 @@ sub cmd_sbuild { my $multichanges = "${package}_".(stripepoch $version)."_multi.changes"; if (act_local()) { stat_exists $multichanges or fail "$multichanges: $!"; + foreach my $cf (glob $pat) { + next if $cf eq $multichanges; + rename "$cf", "$cf.inmulti" or fail "$cf\{,.inmulti}: $!"; + } } printdone "build successful, results in $multichanges\n" or die $!; }