[Pkg-haskell-commits] darcs: tools: Print more warnings

Joachim Breitner mail at joachim-breitner.de
Wed May 29 08:22:47 UTC 2013


Wed May 29 08:21:38 UTC 2013  Joachim Breitner <mail at joachim-breitner.de>
  * Print more warnings
  Ignore-this: d1635641c96ac56bbc579724692ae786

    M ./all-packages/test-packages.pl -6 +9

Wed May 29 08:21:38 UTC 2013  Joachim Breitner <mail at joachim-breitner.de>
  * Print more warnings
  Ignore-this: d1635641c96ac56bbc579724692ae786
diff -rN -u old-tools//all-packages/test-packages.pl new-tools//all-packages/test-packages.pl
--- old-tools//all-packages/test-packages.pl	2013-05-29 08:22:47.565536226 +0000
+++ new-tools//all-packages/test-packages.pl	2013-05-29 08:22:47.577549171 +0000
@@ -29,7 +29,7 @@
 open AVAILABLE, "-|", "grep-aptavail -F GHC-Package . -s GHC-Package -n" or die $!;
 while (<AVAILABLE>) {
 	chomp;
-	unless (m/^(.*)-(.*)-(.*)$/) {
+	unless (m/^(.*)-([0-9\.]*)-([a-f0-9]*?)$/) {
 		print "Ignoring unparseable grep-aptavail output line $.: $_\n";
 	}
 	$available{$1} = $2;
@@ -38,17 +38,20 @@
 }
 close AVAILABLE;
 
-print "Checking for outdated entries...\n";
+print "Checking for outdated entries (produces false warnings for non-libraries)...\n";
 for my $pkg (sort keys %packages) {
 	if (! exists($versions{$pkg})) {
-		printf "Missing entry: %s %s\n" ,
+		printf "MISSING: %s %s\n" ,
 			$pkg, $available{$pkg};
-	} elsif (! exists($versions{$pkg})) {
-		printf "%s is %s here but does not exist in the archive.\n" ,
+	} elsif (! exists($available{$pkg})) {
+		printf "New:     %s is %s here but does not exist in the archive.\n" ,
 			$pkg, $versions{$pkg};
 	} elsif ( version->parse($versions{$pkg}) < version->parse($available{$pkg}) ) {
-		printf "%s is %s here but %s exists in the archive.\n" ,
+		printf "OLD:     %s is %s here but %s exists in the archive.\n" ,
 			$pkg, $versions{$pkg}, $available{$pkg};
+	} elsif ( version->parse($versions{$pkg}) > version->parse($available{$pkg}) ) {
+		printf "Updated: %s is %s in the archive but %s exists here.\n" ,
+			$pkg, $available{$pkg}, $versions{$pkg};
  	}
 }
 





More information about the Pkg-haskell-commits mailing list