From: Ian Jackson Date: Sat, 4 Jun 2016 17:31:53 +0000 (+0100) Subject: dgit: Rename $suppress_clean to $clean_using_builder (nfc) X-Git-Tag: archive/debian/2.0~296 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=1d90ef8b49ccf6156953d7595d33680276a8e8c7;p=dgit.git dgit: Rename $suppress_clean to $clean_using_builder (nfc) This variable name was very confusing. Also, add a comment explaining the semantics. --- diff --git a/dgit b/dgit index 1477d172..4b4380b4 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';