Commit fe1d0e18 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 344661: Cannot upgrade PostgreSQL installations anymore - Patch by Frédéric…

Bug 344661: Cannot upgrade PostgreSQL installations anymore - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=myk
parent e630191a
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment