summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-13 11:12:51 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-13 11:33:17 +0100
commita7a444f863e150475b2ab7ccc33576f68e08c734 (patch)
tree7695bca35b3a786c147368d3537ef57dea0eeb8d
parentcadb4c6130bb56b2be42c8efdbcbfbf9e2e1423f (diff)
dgit: Rorganise dpkg-source[-d] clean implementation
This will make it easier to introduce new variants. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-xdgit10
1 files changed, 5 insertions, 5 deletions
diff --git a/dgit b/dgit
index 9c1f3e5..4cbc378 100755
--- a/dgit
+++ b/dgit
@@ -6202,12 +6202,12 @@ sub maybe_unapply_patches_again () {
sub clean_tree () {
# We always clean the tree ourselves, rather than leave it to the
# builder (dpkg-source, or soemthing which calls dpkg-source).
- if ($cleanmode eq 'dpkg-source') {
+ if ($cleanmode =~ m{^dpkg-source}) {
+ my @cmd = @dpkgbuildpackage;
+ push @cmd, qw(-d) if $cleanmode =~ m{^dpkg-source-d};
+ push @cmd, qw(-T clean);
maybe_apply_patches_dirtily();
- runcmd_ordryrun_local @dpkgbuildpackage, qw(-T clean);
- } elsif ($cleanmode eq 'dpkg-source-d') {
- maybe_apply_patches_dirtily();
- runcmd_ordryrun_local @dpkgbuildpackage, qw(-d -T clean);
+ runcmd_ordryrun_local @cmd;
} elsif ($cleanmode eq 'git') {
runcmd_ordryrun_local @git, qw(clean -xdf);
} elsif ($cleanmode eq 'git-ff') {