[Pkg-haskell-commits] [package-plan] 276/457: Handly binary packages in test-packages.pl

Joachim Breitner nomeata at moszumanska.debian.org
Mon Apr 14 20:05:36 UTC 2014


This is an automated email from the git hooks/post-receive script.

nomeata pushed a commit to branch master
in repository package-plan.

commit d1d982564ab96c014f24bb1aae77b014901fcadd
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Tue Dec 3 14:54:36 2013 +0000

    Handly binary packages in test-packages.pl
---
 test-packages.pl | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/test-packages.pl b/test-packages.pl
index 0c3b165..d7a449e 100644
--- a/test-packages.pl
+++ b/test-packages.pl
@@ -17,6 +17,7 @@ my %versions;
 my %available;
 my %comments;
 my %notest;
+my %binary;
 my @flags;
 
 my $allow_upgrade = 0;
@@ -39,6 +40,8 @@ while (<PACKAGES>) {
 	$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 @@ while (<AVAILABLE>) {
 	}
 	$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})) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/package-plan.git



More information about the Pkg-haskell-commits mailing list