From 17bf50c840dcbc9cece5b6a18ed0fe1574bf99a0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 28 Oct 2009 18:22:44 -0400 Subject: [PATCH] logic simplification --- dh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dh b/dh index 8e781b6..775e949 100755 --- a/dh +++ b/dh @@ -239,9 +239,9 @@ inhibit_log(); # server. if (is_make_jobserver_unavailable()) { clean_jobserver_makeflags(); - # Enable parallel (no maximum) if a value was not previously + # Implicitly enable parallel (no maximum) if a value was not previously # specified. - $dh{PARALLEL} = 0 if !defined $dh{PARALLEL}; + $dh{PARALLEL} = 0 unless defined $dh{PARALLEL}; } # Definitions of sequences. @@ -536,8 +536,8 @@ sub run { # to prevent them from being acted on. push @options, map { "-N$_" } @exclude; - # Pass --parallel to dh_auto_* commands if requested - if (defined $dh{PARALLEL} && ($dh{PARALLEL} == 0 || $dh{PARALLEL} > 1) + # Pass --parallel to dh_auto_* commands. + if (defined $dh{PARALLEL} && $dh{PARALLEL} != 1 && $command =~ /^dh_auto_/) { push @options, "--parallel" . ($dh{PARALLEL} > 1 ? "=$dh{PARALLEL}" : ""); } -- 2.39.5