[Pkg-haskell-commits] darcs: tools: Handly binary packages in test-packages.pl
Joachim Breitner
mail at joachim-breitner.de
Tue Dec 3 14:57:19 UTC 2013
Tue Dec 3 14:54:36 UTC 2013 Joachim Breitner <mail at joachim-breitner.de>
* Handly binary packages in test-packages.pl
M ./all-packages/test-packages.pl -1 +18
Tue Dec 3 14:54:36 UTC 2013 Joachim Breitner <mail at joachim-breitner.de>
* Handly binary packages in test-packages.pl
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-12-03 14:57:19.163969952 +0000
+++ new-tools/all-packages/test-packages.pl 2013-12-03 14:57:19.211969946 +0000
@@ -17,6 +17,7 @@
my %available;
my %comments;
my %notest;
+my %binary;
my @flags;
my $allow_upgrade = 0;
@@ -39,6 +40,8 @@
$versions{$pkg} = $version;
next unless $comment;
$notest{$pkg}++ if $comment =~ s/notest\s*//;
+ $binary{$pkg} = $1 if $comment =~ s/binary=([a-z0-9-]+)\s*//;
+ $binary{$pkg} = $pkg if $comment =~ s/binary\s*//;
push @flags, $1 while $comment =~ s/(-f[^ ]+)\s*//;
$comments{$pkg} = $comment if $comment;
}
@@ -53,10 +56,24 @@
}
$available{$1} = $2;
$packages{$1}++;
-
}
close AVAILABLE;
+print "Reading avilable binary versions...\n";
+while ( my ($pkg, $bin) = each %binary ) {
+ open VERS, "-|", "grep-aptavail -F Package -s Version -n -X $bin" or die $!;
+ while (<VERS>) {
+ chomp;
+ unless (m/^(?:.*:)?(.*)-(?:.*)$/) {
+ print "Ignoring unparseable version for $pkg: $_\n";
+ }
+ $available{$pkg} = $1;
+ $packages{$pkg}++;
+ }
+ close VERS;
+}
+
+
print "Checking for outdated entries (produces false warnings for non-libraries)...\n";
for my $pkg (sort keys %packages) {
if (! exists($versions{$pkg})) {
More information about the Pkg-haskell-commits
mailing list