From 69c8de09ff5cb507a7628282d346c2c8fd487a86 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 25 Oct 2016 16:00:50 +0100 Subject: [PATCH 1/1] build changes handling: Run mergechanges when needed in non-sbuild build modes Signed-off-by: Ian Jackson --- debian/changelog | 2 ++ dgit | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 14fbbebe..f36ae86a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 356b48c6..d6a63268 100755 --- 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 -- 2.30.2