X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=dh;fp=dh;h=7cab4c0cc6fd580c61b2ffc9e53332c397acb334;hb=e14e51cc8d91ac28fb215ef27233f3ee3204cf11;hp=3afec5275a0896bd16052880a5e3d781e376dfca;hpb=0152f75c3dd6de14dfca258ce7ca2f90cea055fa;p=debhelper.git diff --git a/dh b/dh index 3afec52..7cab4c0 100755 --- a/dh +++ b/dh @@ -629,18 +629,18 @@ foreach my $i (0..$stoppoint) { my $command=$sequence[$i]; # Figure out which packages need to run this command. - my @exclude; + my @todo; + my @opts=@options; foreach my $package (@packages) { if ($startpoint{$package} > $i || $logged{$package}{$sequence[$i]}) { - push @exclude, $package; + push @opts, "-N$package"; + } + else { + push @todo, $package; } } - - if (@exclude eq @packages) { - # Command already done for all packages. - next; - } + next unless @todo; my $rules_target = rules_target($command); if (defined $rules_target) { @@ -652,15 +652,9 @@ foreach my $i (0..$stoppoint) { next; } - my @opts=@options; - # If some packages are excluded, add flags - # to prevent them from being acted on. - push @opts, map { "-N$_" } @exclude; - # Check for override targets in debian/rules, and run instead of # the usual command. - next if run_override("override_".$command, $command, - \@packages, \@exclude, @opts); + next if run_override("override_".$command, $command, \@todo, @opts); run($command, @opts); } @@ -693,7 +687,6 @@ sub run_override { my $override=shift; my $command=shift; my @packages=@{shift()}; - my @exclude=@{shift()}; my @options=@_; my $has_explicit_target = rules_explicit_target($override); @@ -713,10 +706,8 @@ sub run_override { # (But avoid logging for dh_clean since it removes # the log earlier.) if (! $dh{NO_ACT} && $command ne 'dh_clean') { - my %packages=map { $_ => 1 } @packages; - map { delete $packages{$_} } @exclude; - write_log($command, keys %packages); - commit_override_log(keys %packages); + write_log($command, @packages); + commit_override_log(@packages); } return 1;