summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdh16
1 files changed, 7 insertions, 9 deletions
diff --git a/dh b/dh
index 4e69bb2e..d6ba0c4f 100755
--- a/dh
+++ b/dh
@@ -695,6 +695,7 @@ my ($rules_targets, $full_sequence) = optimize_sequence(\%sequences,
(!compat(9) ? 0 : 1),
\%completed_sequences
);
+my $stoppoint = $#{$full_sequence};
if (compat(9)) {
foreach my $package (@packages) {
@@ -731,21 +732,18 @@ if (compat(9)) {
}
}
}
+ # Figure out what point in the sequence to go to.
+ if ($dh{UNTIL}) {
+ $stoppoint = command_pos($dh{UNTIL}, @{$full_sequence});
+ } elsif ($dh{BEFORE}) {
+ $stoppoint = command_pos($dh{BEFORE}, @{$full_sequence}) - 1;
+ }
} else {
foreach my $package (@packages) {
$startpoint{$package} = 0;
}
}
-# Figure out what point in the sequence to go to.
-my $stoppoint=$#{$full_sequence};
-if ($dh{UNTIL}) {
- $stoppoint = command_pos($dh{UNTIL}, @{$full_sequence});
-}
-elsif ($dh{BEFORE}) {
- $stoppoint = command_pos($dh{BEFORE}, @{$full_sequence}) - 1;
-}
-
for my $rules_command (@{$rules_targets}) {
my $rules_target = extract_rules_target_name($rules_command)
// error("Internal error: $rules_command was not a rules target!?");