[Pkg-haskell-commits] darcs: tools: Use Dpkg::Version

Joachim Breitner mail at joachim-breitner.de
Wed May 29 18:57:24 UTC 2013


Wed May 29 18:00:47 UTC 2013  Joachim Breitner <mail at joachim-breitner.de>
  * Use Dpkg::Version
  Ignore-this: e3b4b3a92a60148fcb2b4e0760b48eb0
  
  as it matches Cabal's version semantics better

    M ./all-packages/test-packages.pl -3 +3

Wed May 29 18:00:47 UTC 2013  Joachim Breitner <mail at joachim-breitner.de>
  * Use Dpkg::Version
  Ignore-this: e3b4b3a92a60148fcb2b4e0760b48eb0
  
  as it matches Cabal's version semantics better
diff -rN -u old-tools//all-packages/test-packages.pl new-tools//all-packages/test-packages.pl
--- old-tools//all-packages/test-packages.pl	2013-05-29 18:57:24.475323548 +0000
+++ new-tools//all-packages/test-packages.pl	2013-05-29 18:57:24.483348353 +0000
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use version;
+use Dpkg::Version;
 
 my %packages;
 my %versions;
@@ -46,10 +46,10 @@
 	} 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};
  	}





More information about the Pkg-haskell-commits mailing list