This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=4014981b968a8e3c734d5113ce7a323d3ace13ad

commit 4014981b968a8e3c734d5113ce7a323d3ace13ad
Author: Guillem Jover <[email protected]>
AuthorDate: Tue Jul 24 00:37:33 2018 +0200

    dpkg-buildpackage: Rename and logic invert $noclean to $postclean
    
    Makes the purpose of the variable clear.
---
 scripts/dpkg-buildpackage.pl | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index e8892269f..460153c9d 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -147,7 +147,7 @@ my $admindir;
 my @debian_rules = ('debian/rules');
 my @rootcommand = ();
 my $signcommand;
-my $noclean;
+my $preclean = 1;
 my $postclean = 0;
 my $parallel;
 my $parallel_force = 0;
@@ -316,9 +316,9 @@ while (@ARGV) {
     } elsif (/^--as-root$/) {
         $call_target_as_root = 1;
     } elsif (/^--pre-clean$/) {
-       $noclean = 0;
+        $preclean = 1;
     } elsif (/^-nc$/ or /^--no-pre-clean$/) {
-       $noclean = 1;
+        $preclean = 0;
     } elsif (/^--build=(.*)$/) {
         set_build_type_from_options($1, $_);
     } elsif (/^-b$/) {
@@ -370,7 +370,7 @@ if (build_has_all(BUILD_BINARY)) {
     $binarytarget = 'binary-indep';
 }
 
-if ($noclean) {
+if (not $preclean) {
     # -nc without -b/-B/-A/-S/-F implies -b
     set_build_type(BUILD_BINARY) if build_has_any(BUILD_DEFAULT);
     # -nc with -S implies no dependency checks
@@ -542,9 +542,9 @@ foreach my $call_target (@call_target) {
 }
 exit 0 if scalar @call_target;
 
-run_hook('preclean', ! $noclean);
+run_hook('preclean', $preclean);
 
-unless ($noclean) {
+if ($preclean) {
     run_rules_cond_root('clean');
 }
 
@@ -552,7 +552,7 @@ run_hook('source', build_has_any(BUILD_SOURCE));
 
 if (build_has_any(BUILD_SOURCE)) {
     warning(g_('building a source package without cleaning up as you asked; ' .
-               'it might contain undesired files')) if $noclean;
+               'it might contain undesired files')) if not $preclean;
     run_cmd('dpkg-source', @source_opts, '-b', '.');
 }
 

-- 
Dpkg.Org's dpkg

Reply via email to