From 1d90ef8b49ccf6156953d7595d33680276a8e8c7 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 4 Jun 2016 18:31:53 +0100 Subject: dgit: Rename $suppress_clean to $clean_using_builder (nfc) This variable name was very confusing. Also, add a comment explaining the semantics. --- dgit | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'dgit') diff --git a/dgit b/dgit index 1477d17..4b4380b 100755 --- a/dgit +++ b/dgit @@ -3220,10 +3220,14 @@ sub quilt_fixup_editor () { #----- other building ----- -our $suppress_clean; +our $clean_using_builder; +# ^ tree is to be cleaned by dpkg-source's builtin idea that it should +# clean the tree before building (perhaps invoked indirectly by +# whatever we are using to run the build), rather than separately +# and explicitly by us. sub clean_tree () { - return if $suppress_clean; + return if $clean_using_builder; if ($cleanmode eq 'dpkg-source') { runcmd_ordryrun_local @dpkgbuildpackage, qw(-T clean); } elsif ($cleanmode eq 'dpkg-source-d') { @@ -3328,7 +3332,7 @@ sub massage_dbp_args ($;$) { debugcmd '#massaging#', @$cmd if $debuglevel>1; #print STDERR "MASS0 ",Dumper($cmd, $xargs, $need_split_build_invocation); if ($cleanmode eq 'dpkg-source' && !$need_split_build_invocation) { - $suppress_clean = 1; + $clean_using_builder = 1; return 0; } # -nc has the side effect of specifying -b if nothing else specified @@ -3388,7 +3392,7 @@ sub cmd_gbp_build { if ($wantsrc > 0) { build_source(); } else { - if (!$suppress_clean) { + if (!$clean_using_builder) { push @cmd, '--git-cleaner=true'; } build_prep(); @@ -3408,7 +3412,7 @@ 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 - $suppress_clean = 1; + $clean_using_builder = 1; } build_prep(); $sourcechanges = changespat $version,'source'; -- cgit v1.2.3