[Pkg-haskell-commits] [package-plan] 01/05: Slightly more sane syntax for packages.txt

Joachim Breitner nomeata at moszumanska.debian.org
Fri Aug 8 11:18:22 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 5bd00d8363c48222ba63abde6862a77fdbbb426c
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Fri Aug 8 11:16:23 2014 +0200

    Slightly more sane syntax for packages.txt
    
    Ignoring packages requires an explicit "ignore", comments go after a #
---
 packages.txt     | 10 +++++-----
 test-packages.pl | 30 +++++++++++++++++-------------
 2 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/packages.txt b/packages.txt
index 36d112d..45075ed 100644
--- a/packages.txt
+++ b/packages.txt
@@ -132,7 +132,7 @@ csv 0.1.2
 csv-conduit 0.6.3
 curl 1.3.8
 darcs 2.8.4
-darcs-monitor 0.4.2 binary broken, HaXml dependency too old
+darcs-monitor 0.4.2 ignore # binary broken, HaXml dependency too old
 data-accessor 0.2.2.6
 data-accessor-mtl 0.2.0.4
 data-accessor-template 0.2.1.11
@@ -158,7 +158,7 @@ dependent-map 0.1.1.2
 dependent-sum 0.2.1.0
 dependent-sum-template 0.0.0.1
 derive 2.5.13
-diagrams 1.2 binary=libghc-diagrams-dev hand-created meta package, does not yet pull in diagrams-contrib
+diagrams 1.2 binary=libghc-diagrams-dev ignore # hand-created meta package, does not yet pull in diagrams-contrib
 diagrams-cairo 1.2
 diagrams-core 1.2
 diagrams-gtk 1.0.1.2
@@ -214,7 +214,7 @@ filestore 0.6.0.3
 fingertree 0.1.0.0
 foldl 1.0.3
 free 4.9
-frown 0.6.1 binary not on hackage
+frown 0.6.1 binary ignore # not on hackage
 fsnotify 0.0.11 notest
 ftphs 1.0.9.1
 gconf 0.12.1.1
@@ -559,7 +559,7 @@ semigroups 0.13.0.1
 sendfile 0.7.9
 setenv 0.1.0 notest
 set-extra 1.3.1
-setlocale 1.0.0 not on hackage
+setlocale 1.0.0 ignore # not on hackage
 sfml-audio 0.7.0.1816
 SHA 1.6.1
 shake 0.13.2
@@ -613,7 +613,7 @@ syb-with-class-instances-text 0.0.1
 system-fileio 0.3.11
 system-filepath 0.4.12
 tabular 0.2.2.5
-taffybar 0.2.1 patched for dbus et al
+taffybar 0.2.1 ignore # patched for dbus et al
 tagged 0.7.2
 tagsoup 0.13.1
 tagstream-conduit 0.5.5.1
diff --git a/test-packages.pl b/test-packages.pl
index a081cee..18969bc 100755
--- a/test-packages.pl
+++ b/test-packages.pl
@@ -16,7 +16,7 @@ use List::MoreUtils qw(uniq);
 my %packages;
 my %versions;
 my %available;
-my %comments;
+my %ignored;
 my %notest;
 my %binary;
 my %obsolete;
@@ -37,23 +37,27 @@ while (<PACKAGES>) {
 	chomp;
 	next if /^#/;
 	next if /^\s*$/;
-	unless (m/^(.*?) (.*?)(?: (.*))?$/) {
+	unless (m/^(.*?) (.*?)(?: ([^#]*))?(?:#.*)?$/) {
 		print "Ignoring unparseable line $.: $_\n";
 	}
-	my ($pkg,$version,$comment) = ($1,$2,$3);
+	my ($pkg,$version,$attribs) = ($1,$2,$3);
 	$packages{$pkg}++;
-	if ($comment and $comment =~ s/obsolete\s*//) {
+	if ($attribs and $attribs =~ s/obsolete\s*//) {
 		$obsolete{$pkg}++;
 		next;
 	}
 	$versions{$pkg} = $version;
-	next unless $comment;
-	$notest{$pkg}++ if $comment =~ s/notest\s*//;
-	$binary{$pkg} = $1 if $comment =~ s/binary=([a-z0-9-]+)\s*//;
-	$group{$pkg} = $1 if $comment =~ s/group=([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;
+	next unless $attribs;
+	$ignored{$pkg}++ if $attribs =~ s/ignore\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*//;
+	push @flags, $1 while $attribs =~ s/(-f[^ ]+)\s*//;
+
+	if ($attribs) {
+		warn "Unknown attributs for $pkg: $attribs\n"
+	}
 }
 close PACKAGES;
 
@@ -248,7 +252,7 @@ for my $group (@groups) {
 	}
 
 	for my $pkg (sort keys %versions) {
-		next if (exists $comments{$pkg});
+		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);
@@ -261,7 +265,7 @@ for my $group (@groups) {
 		}
 	}
 	for my $pkg (sort keys %versions) {
-		next if (exists $comments{$pkg});
+		next if (exists $ignored{$pkg});
 		next if (exists $obsolete{$pkg});
 		next if (($group{$pkg} || 'default') ne $group);
 		push @params, sprintf "%s", $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