chiark / gitweb /
When using sbuild, pass the arguments to mergechanges in the right order so that...
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 24 Oct 2013 16:42:20 +0000 (17:42 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 24 Oct 2013 16:42:20 +0000 (17:42 +0100)
debian/changelog
dgit

index a6729c6cc03177b06e1aa46081a31b2112d667cd..3ecbbdbe323ab52cad2d07eeea187497a10f233b 100644 (file)
@@ -1,3 +1,11 @@
+dgit (0.17~experimental4) experimental; urgency=low
+
+  * When using sbuild, pass the arguments to mergechanges in the right
+    order so that we use the correct Description (the _source one,
+    not the one from sbuild which didn't get e.g. -v<version>).
+
+ --
+
 dgit (0.17~experimental3) experimental; urgency=low
 
   Minor fix to remote functionality:
diff --git a/dgit b/dgit
index 37a61111db92ea2bf3257cb6259b25e667f76348..441114db404124b179c7aac9f5cf914bd96e5acb 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1759,7 +1759,14 @@ sub cmd_sbuild {
        }
     }
     runcmd_ordryrun_local @sbuild, @ARGV, qw(-d), $isuite, $dscfn;
-    runcmd_ordryrun_local @mergechanges, glob $pat;
+    my @changesfiles = glob $pat;
+    @changesfiles = sort {
+       ($b =~ m/_source\.changes$/ <=> $a =~ m/_source\.changes$/)
+           or $a cmp $b
+    } @changesfiles;
+    fail "wrong number of different changes files (@changesfiles)"
+       unless @changesfiles;
+    runcmd_ordryrun_local @mergechanges, @changesfiles;
     my $multichanges = "${package}_".(stripepoch $version)."_multi.changes";
     if (act_local()) {
        stat $multichanges or fail "$multichanges: $!";