diff options
author | lpsolit%gmail.com <> | 2006-07-16 23:22:56 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-07-16 23:22:56 +0200 |
commit | fe1d0e18e5f58c0a3d1c59941e736928b154aea7 (patch) | |
tree | dec9d365aed2636b6041e90e58a1e6f0d1189a6b /Bugzilla/Install | |
parent | e630191abbcbcb70367f166669587d352e48e853 (diff) | |
download | bugzilla-fe1d0e18e5f58c0a3d1c59941e736928b154aea7.tar.gz bugzilla-fe1d0e18e5f58c0a3d1c59941e736928b154aea7.tar.xz |
Bug 344661: Cannot upgrade PostgreSQL installations anymore - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=myk
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r-- | Bugzilla/Install/Requirements.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Bugzilla/Install/Requirements.pm b/Bugzilla/Install/Requirements.pm index 790739554..e8f27c503 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) { |