[Pkg-haskell-commits] [package-plan] 427/457: Let test-packages report obsolete packages

Joachim Breitner nomeata at moszumanska.debian.org
Mon Apr 14 20:05:58 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 353d94f114d38973ae0420bcad5f0ddabe2a33a8
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Fri Mar 7 12:42:37 2014 +0000

    Let test-packages report obsolete packages
---
 packages.txt     |  4 +++-
 test-packages.pl | 21 ++++++++++++++++-----
 2 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/packages.txt b/packages.txt
index 6e122dc..89241da 100644
--- a/packages.txt
+++ b/packages.txt
@@ -138,7 +138,7 @@ data-inttrie 0.0.8
 data-lens 2.10.4
 data-memocombinators 0.4.4
 data-pprint 0.2.3
-date-cache 0.3.0
+date-cache 0.3.0 obsolete
 datetime 0.2.1
 DAV 0.6.1
 dbus 0.10.4
@@ -616,6 +616,7 @@ threadscope 0.2.2 binary
 time-compat 0.1.0.1
 TinyURL 0.1.0
 tls 1.2.2
+tls-extra 0.6.6 obsolete
 tokyocabinet-haskell 0.0.5
 transformers 0.3.0.0
 transformers-base 0.4.1
@@ -655,6 +656,7 @@ wai-handler-fastcgi 2.0.0
 wai-handler-launch 2.0.0
 wai-handler-scgi 2.0.0
 wai-logger 2.1.1
+wai-logger-prefork 0.3.0 obsolete
 wai-test 2.0.0.1
 wai-websockets 2.0.0.1
 warp 2.0.3.2
diff --git a/test-packages.pl b/test-packages.pl
index 019e7b9..a044fb7 100644
--- a/test-packages.pl
+++ b/test-packages.pl
@@ -19,6 +19,7 @@ my %available;
 my %comments;
 my %notest;
 my %binary;
+my %obsolete;
 my @flags;
 
 my $allow_upgrade = 0;
@@ -38,6 +39,10 @@ while (<PACKAGES>) {
 	}
 	my ($pkg,$version,$comment) = ($1,$2,$3);
 	$packages{$pkg}++;
+	if ($comment and $comment =~ s/obsolete\s*//) {
+		$obsolete{$pkg}++;
+		next;
+	}
 	$versions{$pkg} = $version;
 	next unless $comment;
 	$notest{$pkg}++ if $comment =~ s/notest\s*//;
@@ -77,17 +82,23 @@ while ( my ($pkg, $bin) = each %binary ) {
 
 print "Checking for outdated entries...\n";
 for my $pkg (sort keys %packages) {
-	if (! exists($versions{$pkg})) {
-		printf "MISSING: %s %s\n" ,
+	if ($obsolete{$pkg} && $available{$pkg}) {
+		printf "Obsolete: %s %s\n" ,
+			$pkg, $available{$pkg};
+	} elsif ($obsolete{$pkg} && !$available{$pkg}) {
+		printf "REMOVED:  %s %s\n" ,
+			$pkg, $available{$pkg};
+	} elsif (! exists($versions{$pkg})) {
+		printf "MISSING:  %s %s\n" ,
 			$pkg, $available{$pkg};
 	} elsif (! exists($available{$pkg})) {
-		printf "Added:   %s is %s here but does not exist in the archive.\n" ,
+		printf "Added:    %s is %s here but does not exist in the archive.\n" ,
 			$pkg, $versions{$pkg};
 	} elsif ( version_compare($versions{$pkg}, $available{$pkg}) == -1 ) {
-		printf "OLD:     %s is %s here but %s exists in the archive.\n" ,
+		printf "OLD:      %s is %s here but %s exists in the archive.\n" ,
 			$pkg, $versions{$pkg}, $available{$pkg};
 	} elsif ( version_compare($versions{$pkg}, $available{$pkg}) == 1 ) {
-		printf "Updated: %s is %s in the archive but %s exists here.\n" ,
+		printf "Updated:  %s is %s in the archive but %s exists here.\n" ,
 			$pkg, $available{$pkg}, $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