[SCM] Debian package checker branch, master, updated. 2.5.10-82-g414e5f5
The following commit has been merged in the master branch:
commit 414e5f575b422b532cd3bdff29795dfd6a05baf9
Author: Niels Thykier <niels@thykier.net>
Date: Mon Jul 23 10:27:14 2012 +0200
c/rules: Merge two if-branches and move out loop invariant
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/checks/rules b/checks/rules
index 4d88897..32686ca 100644
--- a/checks/rules
+++ b/checks/rules
@@ -326,19 +326,13 @@ while (<RULES>) {
$indep = 1 if $target eq '%';
$indep = 1 if $target =~ /^override_/;
}
- if ($arch) {
+ if (not $maybe_skipping and ($arch or $indep)) {
+ my $table = \%needed;
+ $table = \%needed_clean if $arch;
for my $rule (@RULE_CLEAN_DEPENDS) {
- if (/$rule->[1]/ and not $maybe_skipping) {
- $needed_clean{$rule->[0]}
- = $rule->[2] || $needed_clean{$rule->[0]} || '';
- }
- }
- } elsif ($indep) {
- for my $rule (@RULE_CLEAN_DEPENDS) {
- if (/$rule->[1]/ and not $maybe_skipping) {
- $needed{$rule->[0]}
- = $rule->[2] || $needed{$rule->[0]} || '';
- }
+ my ($dep, $pattern, $tagname) = @$rule;
+ next unless /$pattern/;
+ $table->{$dep} = $tagname || $table->{$dep} || '';
}
}
if (m/^\s+(dh_\S+)\b/ and $debhelper_order{$1}) {
--
Debian package checker
Reply to: