From: lpsolit%gmail.com <> Date: Sun, 16 Jul 2006 21:22:56 +0000 (+0000) Subject: Bug 344661: Cannot upgrade PostgreSQL installations anymore - Patch by Frédéric Bucli... X-Git-Tag: bugzilla-2.23.3~258 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe1d0e18e5f58c0a3d1c59941e736928b154aea7;p=thirdparty%2Fbugzilla.git Bug 344661: Cannot upgrade PostgreSQL installations anymore - Patch by Frédéric Buclin r=mkanat a=myk --- diff --git a/Bugzilla/Install/Requirements.pm b/Bugzilla/Install/Requirements.pm index 7907395547..e8f27c503e 100644 --- a/Bugzilla/Install/Requirements.pm +++ b/Bugzilla/Install/Requirements.pm @@ -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) {