[package-plan] 02/02: Mark packages explicitly as behind to make the current state green.
Joachim Breitner
nomeata at moszumanska.debian.org
Thu Jan 21 22:25:39 UTC 2016
This is an automated email from the git hooks/post-receive script.
nomeata pushed a commit to branch master
in repository package-plan.
commit 7f9fdba71404d8a30f70bf151697657817b237c8
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Thu Jan 21 23:25:01 2016 +0100
Mark packages explicitly as behind to make the current state green.
---
README.md | 3 +++
packages.txt | 4 ++--
test-packages.pl | 25 +++++++++++++++++++------
3 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index 45593a0..af2f905 100644
--- a/README.md
+++ b/README.md
@@ -48,6 +48,9 @@ The following flags are supported:
* ahead:
Indicates that this package is known and allowed to be newer than specified
in the tracked LTS release.
+ * behind:
+ Indicates that this package is known and allowed to be older than specified
+ in the tracked LTS release.
* key:
Indicates that this package is a key package.
diff --git a/packages.txt b/packages.txt
index 4d53c63..d75c774 100644
--- a/packages.txt
+++ b/packages.txt
@@ -264,8 +264,8 @@ glib 0.13.2.2
Glob 0.7.5
gloss 1.9.4.1 key
gloss-rendering 1.9.3.1
-GLURaw 1.5.0.1
-GLUT 2.7.0.5 behind
+GLURaw 1.5.0.1 behind
+GLUT 2.7.0.5
gnuidn 0.2.2
gnutls 0.2
GraphSCC 1.0.4
diff --git a/test-packages.pl b/test-packages.pl
index 7e6efb7..53aa89d 100755
--- a/test-packages.pl
+++ b/test-packages.pl
@@ -26,6 +26,7 @@ my %flags;
my %group;
my %meta;
my %ahead;
+my %behind;
my %key;
my $allow_upgrade = 0;
@@ -73,6 +74,7 @@ while (<PACKAGES>) {
$ghcpkg{$pkg}++ if $attribs =~ s/ghcpkg\s*//;
$meta{$pkg}++ if $attribs =~ s/meta\s*//;
$ahead{$pkg}++ if $attribs =~ s/ahead\s*//;
+ $behind{$pkg}++ if $attribs =~ s/behind\s*//;
$key{$pkg}++ if $attribs =~ s/key\s*//;
$flags{$pkg} = [] unless exists $flags{$pkg};
push @{$flags{$pkg}}, $1 while $attribs =~ s/-f([^ ]+)\s*//;
@@ -193,7 +195,8 @@ for my $pkg (sort keys %packages) {
}
if ( exists $lts{$pkg} and exists $versions{$pkg} ) {
- if ( version_compare($versions{$pkg}, $lts{$pkg}) == 1 ) {
+ my $cmp = version_compare($versions{$pkg}, $lts{$pkg});
+ if ( $cmp == 1 ) {
if ( exists $ahead{$pkg} ) {
# printf "Ahead: %s is %s here, but only %s in the tracked LTS release (expected).\n" ,
# $pkg, $available{$pkg}, $lts{$pkg};
@@ -204,16 +207,26 @@ for my $pkg (sort keys %packages) {
$stats{AHEAD}++;
$error_count++;
}
- } elsif ( version_compare($versions{$pkg}, $lts{$pkg}) <= 1 ) {
+ } else {
if ( exists $ahead{$pkg} ) {
printf "NOT AHEAD:%s is (no longer) ahead of the LTS release, remove marker!\n", $pkg;
$error_count++;
}
- if ( version_compare($versions{$pkg}, $lts{$pkg}) == -1 ) {
- printf "BEHIND: %s is %s here, %s in the archive, but already %s in the tracked LTS release.\n" ,
+ }
+
+ if ( $cmp == -1 ) {
+ if ( exists $behind{$pkg} ) {
+ $stats{"known-behind"}++;
+ } else {
+ printf "BEHIND: %s is %s here, %s in the archive, but already %s in the tracked LTS release.\n" ,
$pkg, $versions{$pkg}, ($available{$pkg} or "MISSING"), $lts{$pkg};
- $error_count++;
$stats{"lts-upgradeable"}++;
+ $error_count++;
+ }
+ } else {
+ if ( exists $behind{$pkg} ) {
+ printf "NOTBEHIND:%s is (no longer) behind of the LTS release, remove marker!\n", $pkg;
+ $error_count++;
}
}
}
@@ -395,7 +408,7 @@ for my $group (sort @groups) {
if (not exists $ghcpkg{$pkg}) {
push @params, "--constraint", sprintf "%s (== 42.23.1.2)", $pkg;
}
- } elsif ($assume_lts and not exists $ahead{$pkg} and exists $lts{$pkg}) {
+ } elsif ($assume_lts and not exists $ahead{$pkg} and not exists $behind{$pkg} and exists $lts{$pkg}) {
push @params, "--constraint", sprintf "%s (== %s)", $pkg, $lts{$pkg};
} elsif ($allow_upgrade) {
push @params, "--constraint", sprintf "%s (>= %s)", $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