]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 344661: Cannot upgrade PostgreSQL installations anymore - Patch by Frédéric Bucli...
authorlpsolit%gmail.com <>
Sun, 16 Jul 2006 21:22:56 +0000 (21:22 +0000)
committerlpsolit%gmail.com <>
Sun, 16 Jul 2006 21:22:56 +0000 (21:22 +0000)
Bugzilla/Install/Requirements.pm

index 790739554771a2e23fe3666f93c88d163bc8861e..e8f27c503e52af6cb9541cc2b67f548fafa79bbb 100644 (file)
@@ -149,8 +149,14 @@ sub have_vers {
 # This is taken straight from Sort::Versions 1.5, which is not included
 # with perl by default.
 sub vers_cmp {
-    my @A = ($_[0] =~ /([-.]|\d+|[^-.\d]+)/g);
-    my @B = ($_[1] =~ /([-.]|\d+|[^-.\d]+)/g);
+    my ($a, $b) = @_;
+
+    # Remove leading zeroes - Bug 344661
+    $a =~ s/^0*(.*)/$1/;
+    $b =~ s/^0*(.*)/$1/;
+
+    my @A = ($a =~ /([-.]|\d+|[^-.\d]+)/g);
+    my @B = ($b =~ /([-.]|\d+|[^-.\d]+)/g);
 
     my ($A, $B);
     while (@A and @B) {