summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdgit21
1 files changed, 15 insertions, 6 deletions
diff --git a/dgit b/dgit
index 4d31cd6..9763bbf 100755
--- a/dgit
+++ b/dgit
@@ -3415,8 +3415,17 @@ sub cmd_gbp_build {
sub cmd_git_build { cmd_gbp_build(); } # compatibility with <= 1.0
sub build_source {
- if ($cleanmode =~ m/^dpkg-source/) {
- # dpkg-source will clean, so we shouldn't
+ my $our_cleanmode = $cleanmode;
+ if ($need_split_build_invocation) {
+ # Pretend that clean is being done some other way. This
+ # forces us not to try to use dpkg-buildpackage to clean and
+ # build source all in one go; and instead we run dpkg-source
+ # (and build_prep() will do the clean since $clean_using_builder
+ # is false).
+ $our_cleanmode = 'ELSEWHERE';
+ }
+ if ($our_cleanmode =~ m/^dpkg-source/) {
+ # dpkg-source invocation (below) will clean, so build_prep shouldn't
$clean_using_builder = 1;
}
build_prep();
@@ -3426,12 +3435,12 @@ sub build_source {
or fail "remove $sourcechanges: $!";
}
$dscfn = dscfn($version);
- if ($cleanmode eq 'dpkg-source') {
+ if ($our_cleanmode eq 'dpkg-source') {
runcmd_ordryrun_local @dpkgbuildpackage, qw(-us -uc -S),
- changesopts();
- } elsif ($cleanmode eq 'dpkg-source-d') {
+ changesopts();
+ } elsif ($our_cleanmode eq 'dpkg-source-d') {
runcmd_ordryrun_local @dpkgbuildpackage, qw(-us -uc -S -d),
- changesopts();
+ changesopts();
} else {
my $pwd = must_getcwd();
my $leafdir = basename $pwd;