[Pkg-haskell-commits] [package-plan] 99/457: Use Dpkg::Version

Joachim Breitner nomeata at moszumanska.debian.org
Mon Apr 14 20:05:15 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 7c7b3a54caaaee81c2313c95e642fb0a68163c03
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Wed May 29 18:00:47 2013 +0000

    Use Dpkg::Version
    
    as it matches Cabal's version semantics better
---
 test-packages.pl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test-packages.pl b/test-packages.pl
index 530d450..8b46fbd 100644
--- a/test-packages.pl
+++ b/test-packages.pl
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use version;
+use Dpkg::Version;
 
 my %packages;
 my %versions;
@@ -46,10 +46,10 @@ for my $pkg (sort keys %packages) {
 	} elsif (! exists($available{$pkg})) {
 		printf "New:     %s is %s here but does not exist in the archive.\n" ,
 			$pkg, $versions{$pkg};
-	} elsif ( version->parse($versions{$pkg}) < version->parse($available{$pkg}) ) {
+	} elsif ( version_compare($versions{$pkg}, $available{$pkg}) == -1 ) {
 		printf "OLD:     %s is %s here but %s exists in the archive.\n" ,
 			$pkg, $versions{$pkg}, $available{$pkg};
-	} elsif ( version->parse($versions{$pkg}) > version->parse($available{$pkg}) ) {
+	} elsif ( version_compare($versions{$pkg}, $available{$pkg}) == 1 ) {
 		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