diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-12-06 20:12:20 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-07-16 16:47:47 +0100 |
commit | 1ca959f4e5d5452052ca2abb7dfaf29c958f43c7 (patch) | |
tree | 469a81cd0e1d52bbab7091e04431492bfd0fa648 /dgit | |
parent | 57b7ccba1b4e833e9ffc91efe0afe550138f530d (diff) |
Split build: Split clean from source build in split build mode
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -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; |