chiark / gitweb /
build changes handling: Run mergechanges when needed in non-sbuild build modes
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 25 Oct 2016 15:00:50 +0000 (16:00 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 25 Oct 2016 15:02:47 +0000 (16:02 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
dgit

index 14fbbeb..f36ae86 100644 (file)
@@ -2,6 +2,8 @@ dgit (2.8~) unstable; urgency=low
 
   * absurd git-apply fallback: defend against debian/patches/series
     being an unusual object, in case dpkg-source doesn't.
+  * When in split build mode for `gbp-build' or `build', run
+    mergechanges as is required.  Closes:#841990.
 
  --
 
diff --git a/dgit b/dgit
index 356b48c..d6a6326 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -4938,6 +4938,17 @@ END
     printdone "build successful, results in $result\n" or die $!;
 }
 
+sub postbuild_mergechanges_vanilla ($) {
+    my ($wantsrc) = @_;
+    if ($wantsrc == 1) {
+       in_parent {
+           postbuild_mergechanges(undef);
+       };
+    } else {
+       printdone "build successful\n";
+    }
+}
+
 sub cmd_build {
     my @dbp = (@dpkgbuildpackage, qw(-us -uc), changesopts_initial(), @ARGV);
     my $wantsrc = massage_dbp_args \@dbp;
@@ -4952,7 +4963,7 @@ sub cmd_build {
        runcmd_ordryrun_local @dbp;
     }
     maybe_unapply_patches_again();
-    printdone "build successful\n";
+    postbuild_mergechanges_vanilla $wantsrc;
 }
 
 sub pre_gbp_build {
@@ -4988,7 +4999,7 @@ sub cmd_gbp_build {
        push @cmd, changesopts();
        runcmd_ordryrun_local @cmd, @ARGV;
     }
-    printdone "build successful\n";
+    postbuild_mergechanges_vanilla $wantsrc;
 }
 sub cmd_git_build { cmd_gbp_build(); } # compatibility with <= 1.0