r8918 - in /scripts/qa/DebianQA: Archive.pm Svn.pm

tincho-guest at users.alioth.debian.org tincho-guest at users.alioth.debian.org
Tue Nov 6 11:51:46 UTC 2007


Author: tincho-guest
Date: Tue Nov  6 11:51:46 2007
New Revision: 8918

URL: http://svn.debian.org/wsvn/?sc=1&rev=8918
Log:
Fixed (I guess) corruption issues 

Modified:
    scripts/qa/DebianQA/Archive.pm
    scripts/qa/DebianQA/Svn.pm

Modified: scripts/qa/DebianQA/Archive.pm
URL: http://svn.debian.org/wsvn/scripts/qa/DebianQA/Archive.pm?rev=8918&op=diff
==============================================================================
--- scripts/qa/DebianQA/Archive.pm (original)
+++ scripts/qa/DebianQA/Archive.pm Tue Nov  6 11:51:46 2007
@@ -91,10 +91,12 @@
             $g->{$pkg}{$suite} = $data->{$suite}{$pkg};
         }
     }
-    foreach(keys(%$g)) {
-        $g->{$_}{most_recent} = (sort( {
-                    deb_compare($b, $a)
-                } values( %{$g->{$_}} )) )[0];
+    foreach my $pkg (keys(%$g)) {
+        my @recent = sort( {
+                deb_compare($g->{$pkg}{$a}, $g->{$pkg}{$b})
+            } keys(%{$g->{$pkg}}));
+        $g->{$_}{most_recent} = $g->{$pkg}{$recent[-1]};
+        $g->{$_}{most_recent_src} = $recent[-1];
     }
     $data = update_cache("consolidated", $g, "archive", 1, 0);
     unlock_cache("archive");

Modified: scripts/qa/DebianQA/Svn.pm
URL: http://svn.debian.org/wsvn/scripts/qa/DebianQA/Svn.pm?rev=8918&op=diff
==============================================================================
--- scripts/qa/DebianQA/Svn.pm (original)
+++ scripts/qa/DebianQA/Svn.pm Tue Nov  6 11:51:46 2007
@@ -58,7 +58,8 @@
         @changed = @dirlist;
     } else {
         my $cdata = read_cache("svn", "", 0);
-        if(find_stamp($cdata, "") == $revision) {
+        if(find_stamp($cdata, "") == $revision
+                and keys(%$cdata) > @dirlist + 1) {
             return $cdata; # Cache is up-to-date
         }
 
@@ -85,10 +86,11 @@
                     }
                 });
             push @changed, keys %changed;
-            # Copy the not-changed dirs that we want to have the stamp bumped
-            foreach(grep({ ! $changed{$_} } @dirlist)) {
-                $svn{$_} = $cdata->{$_} if($cdata->{$_});
-            }
+        }
+        # Copy the not-changed dirs that we want to have the stamp bumped
+        my %changed = map({ $_ => 1} @changed);
+        foreach(grep({ ! $changed{$_} } @dirlist)) {
+            $svn{$_} = $cdata->{$_} if($cdata->{$_});
         }
     }
     foreach my $dir (@changed) {




More information about the Pkg-perl-cvs-commits mailing list