[Pkg-haskell-commits] [package-plan] 03/03: Treat groups better and GHC packages special

Joachim Breitner nomeata at moszumanska.debian.org
Sun Sep 7 10:38:49 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 333d409c2016115303f615f4cdbcbac0077f5bd3
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Sun Sep 7 12:34:33 2014 +0200

    Treat groups better and GHC packages special
---
 test-packages.pl | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/test-packages.pl b/test-packages.pl
index 3ba3e30..0e63544 100755
--- a/test-packages.pl
+++ b/test-packages.pl
@@ -20,6 +20,7 @@ my %ignored;
 my %notest;
 my %binary;
 my %obsolete;
+my %ghcpkg;
 my @flags;
 my %group;
 
@@ -48,11 +49,12 @@ while (<PACKAGES>) {
 	}
 	$versions{$pkg} = $version;
 	next unless $attribs;
-	$ignored{$pkg}++ if $attribs =~ s/ignore\s*//;
+	$ignored{$pkg}++ if $attribs =~ s/ignored?\s*//;
 	$notest{$pkg}++ if $attribs =~ s/notest\s*//;
 	$binary{$pkg} = $1 if $attribs =~ s/binary=([a-z0-9-]+)\s*//;
 	$group{$pkg} = $1 if $attribs =~ s/group=([a-z0-9-]+)\s*//;
 	$binary{$pkg} = $pkg if $attribs =~ s/binary\s*//;
+	$ghcpkg{$pkg}++ if $attribs =~ s/ghcpkg\s*//;
 	push @flags, $1 while $attribs =~ s/(-f[^ ]+)\s*//;
 
 	if ($attribs) {
@@ -253,11 +255,15 @@ for my $group (@groups) {
 
 	for my $pkg (sort keys %versions) {
 		next if (exists $ignored{$pkg});
-		# For the default group, add all constraints (things might get pulled in)
-		# For other groups, add all constraints from default and the same group
-		next if (defined $group{$pkg} and $group{$pkg} ne $group);
 
-		if ($allow_upgrade) {
+		# If checking the default group, prohibit all packages from other groups
+		# For other groups, allow packages from the default group
+		if ($group eq "default" and defined $group{$pkg}
+		 or $group ne "default" and defined $group{$pkg} and $group{$pkg} ne $group) {
+			if (not exists $ghcpkg{$pkg}) {
+				push @params, "--constraint", sprintf "%s (== 42.23.1.2)", $pkg;
+			}
+		} elsif ($allow_upgrade) {
 			push @params, "--constraint", sprintf "%s (>= %s)", $pkg, $versions{$pkg};
 			push @params, "--preference", sprintf "%s (== %s)", $pkg, $versions{$pkg};
 		} else {

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