[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.2.8-13-g297135b



The following commit has been merged in the master branch:
commit 297135b0f2b4939b6ada5e13694caaaa9446484b
Author: Russ Allbery <rra@debian.org>
Date:   Sat Mar 28 12:57:13 2009 -0700

    Fix handling of multiple removals of diversions
    
    * checks/scripts:
      + [RA] Fix a hash collision that could suppress a correct
        remove-of-unknown-diversion tag if the diversion was removed in
        multiple maintainer scripts including postrm.

diff --git a/checks/scripts b/checks/scripts
index 3dbcfec..e9a6890 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -525,8 +525,7 @@ open(SCRIPTS, '<', "control-scripts")
 # normal scripts above, because there were just enough differences to
 # make a shared function awkward.
 
-my %added_diversions;
-my %removed_diversions;
+my (%added_diversions, @removed_diversions);
 while (<SCRIPTS>) {
     chop;
 
@@ -886,7 +885,7 @@ while (<SCRIPTS>) {
 		    tag 'diversion-for-unknown-file', $divert, "$file:$."
 			unless (exists $info->index->{$divert});
 		} elsif ($mode eq 'remove') {
-		    $removed_diversions{$divert} = [ $file, $. ];
+		    push(@removed_diversions, [ $divert, $file, $. ]);
 		} else {
 		    fail "Internal error: \$mode has unknown value: ".
 			"$mode";
@@ -914,9 +913,8 @@ while (<SCRIPTS>) {
 }
 close(SCRIPTS);
 
-for my $divert (keys %removed_diversions) {
-    my $file = $removed_diversions{$divert}[0];
-    my $line = $removed_diversions{$divert}[1];
+for (@removed_diversions) {
+    my ($divert, $file, $line) = @$_;
 
     if (exists $added_diversions{$divert}) {
 	# do not really delete the entry, because a --remove
diff --git a/debian/changelog b/debian/changelog
index 6c7bda9..61db270 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,10 @@ lintian (2.2.9) UNRELEASED; urgency=low
   * checks/lintian.desc:
     + [CW] Add karmic as an allowable distribution for Ubuntu (thanks, Soren
       Hansen).
+  * checks/scripts:
+    + [RA] Fix a hash collision that could suppress a correct
+      remove-of-unknown-diversion tag if the diversion was removed in
+      multiple maintainer scripts including postrm.
 
   * collection/file-info:
     + [RA] Use chomp instead of chop to remove newlines.

-- 
Debian package checker


Reply to: