[Pkg-haskell-commits] [package-plan] 02/02: Correctly parse cabal-instal output

Joachim Breitner nomeata at moszumanska.debian.org
Sun Aug 3 19:33:27 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 d8f595035fbe6a652492d838df0cd2fff07c3716
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Sun Aug 3 21:33:24 2014 +0200

    Correctly parse cabal-instal output
---
 test-packages.pl | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/test-packages.pl b/test-packages.pl
index ddc2233..a135a2d 100755
--- a/test-packages.pl
+++ b/test-packages.pl
@@ -291,12 +291,20 @@ for my $group (@groups) {
 my %results;
 
 if ($all_runs_ok) {
-	while ($total_out =~ m!^([a-zA-Z0-9-]+)-([0-9.]+)(?: \*test)?(?: \(new package\))?$!gm) {
-		my ($pkg, $version) = ($1, $2);
-		if (exists $results{$pkg} and $results{$pkg} ne $version) {
-			printf "ERROR: Different groups yield different results for %s: %s vs. %s\n", $pkg, $version, $results{$pkg};
+	for (split /\n/, $total_out) {
+		next if $_ eq "Reading available packages...";
+		next if $_ eq "Choosing modular solver.";
+		next if $_ eq "Resolving dependencies...";
+		next if $_ eq "In order, the following would be installed:";
+		if (m!^([a-zA-Z0-9-]+)-([0-9.]+)!gm) {
+			my ($pkg, $version) = ($1, $2);
+			if (exists $results{$pkg} and $results{$pkg} ne $version) {
+				printf "ERROR: Different groups yield different results for %s: %s vs. %s\n", $pkg, $version, $results{$pkg};
+			} else {
+				$results{$pkg} = $version;
+			}
 		} else {
-			$results{$pkg} = $version;
+			print STDERR "Unparseable line in cabal install output: $_\n";
 		}
 	}
 

-- 
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