chiark / gitweb /
sbuild: Rename the used-up .changes files to `.inmulti'
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 6 Nov 2015 14:23:18 +0000 (14:23 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 1 Jul 2016 22:53:44 +0000 (23:53 +0100)
This avoids accidental use of the wrong one (by software, or by users).

debian/changelog
dgit

index 984e6cb1503d630ab3384f28a0bef3257fd4f1ad..a9c6e9e435457cb443e8a2cbb00daed025674008 100644 (file)
@@ -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 32eaa2a830bc68cdea02fd7e7077af8593edc384..a4dea9b44f6bd67cba42ebe17c361e27e7eb0004 100755 (executable)
--- 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 $!;
 }