[Pkg-haskell-commits] [package-plan] 01/01: test-packages.pl: New option --assume-lts

Joachim Breitner nomeata at moszumanska.debian.org
Sun May 31 08:39:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

nomeata pushed a commit to branch master
in repository package-plan.

commit 8b4393de2c522c1cff7a0fc417d8651253233488
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Sun May 31 10:39:48 2015 +0200

    test-packages.pl: New option --assume-lts
---
 README.md        | 17 ++++++++++++-----
 test-packages.pl |  8 +++++++-
 2 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 178826a..f3199d3 100644
--- a/README.md
+++ b/README.md
@@ -101,11 +101,18 @@ this tool will
  * reports on the output (e.g. version mismatches, additional dependendencies pulled in).
  * writes statistics to `stats.csv`, using to create nice plots on jenkins.debian.net.
 
-The script supports one option, `--allow-upgrade`. In that case it allows
-`cabal` not only the precise versin specified here, but also newer versions. In
-theory, this should make it easier to figure out what can be upgraded, or what
-has to be upgraded, given a certain change. In practice, the runtime of `cabal`
-with these options is prohibitive.
+The script supports some options
+
+ * `--allow-upgrade`:
+   In that case it allows `cabal` not only the precise versin specified here,
+   but also newer versions. In theory, this should make it easier to figure out
+   what can be upgraded, or what has to be upgraded, given a certain change. In
+   practice, the runtime of `cabal` with these options is prohibitive.
+ * `--assume-lts`:
+   Overrides the version specified in `packages.txt` by the version specified
+   in `lts.conf` (if there is one, and the package is not marked `ahead`).
+   Useful to find out what non-LTS package break if we follow a newer LTS
+   release.
 
 
 Jenkins integration
diff --git a/test-packages.pl b/test-packages.pl
index 62677fe..ae3c5b9 100755
--- a/test-packages.pl
+++ b/test-packages.pl
@@ -28,11 +28,14 @@ my %meta;
 my %ahead;
 
 my $allow_upgrade = 0;
+my $assume_lts = 0;
+
 my $error_count = 0;
 my %stats;
 
 GetOptions (
 	"allow-upgrade" => \$allow_upgrade,
+	"assume-lts" => \$assume_lts,
 	) or die("Error in command line arguments\n");
 
 print "Reading packages.txt...\n";
@@ -255,7 +258,8 @@ __END__
 			$error_count++;
 			next
 		}
-		unless (exists $versions{$pkg} && $version eq $versions{$pkg}) {
+		unless (exists $versions{$pkg} and $version eq $versions{$pkg}
+		     or exists $lts{$pkg} and $version eq $lts{$pkg}) {
 			# printf "Ignoring patches for %s-%s, version does not match %s in packages.txt\n", $pkg ,$version, $versions{$pkg};
 			next
 		}
@@ -355,6 +359,8 @@ for my $group (@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}) {
+			push @params, "--constraint", sprintf "%s (== %s)", $pkg, $lts{$pkg};
 		} elsif ($allow_upgrade) {
 			push @params, "--constraint", sprintf "%s (>= %s)", $pkg, $versions{$pkg};
 			push @params, "--preference", 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