summaryrefslogtreecommitdiff
path: root/ports-mgmt/porteasy/src/porteasy.pl
diff options
context:
space:
mode:
Diffstat (limited to 'ports-mgmt/porteasy/src/porteasy.pl')
-rw-r--r--ports-mgmt/porteasy/src/porteasy.pl15
1 files changed, 6 insertions, 9 deletions
diff --git a/ports-mgmt/porteasy/src/porteasy.pl b/ports-mgmt/porteasy/src/porteasy.pl
index 0c947dffc176..6bbba53e75ce 100644
--- a/ports-mgmt/porteasy/src/porteasy.pl
+++ b/ports-mgmt/porteasy/src/porteasy.pl
@@ -33,7 +33,7 @@ use strict;
use Fcntl;
use Getopt::Long;
-my $VERSION = "2.7.6";
+my $VERSION = "2.7.7";
my $COPYRIGHT = "Copyright (c) 2000-2003 Dag-Erling Smørgrav. " .
"All rights reserved.";
@@ -849,16 +849,13 @@ sub cmp_version($$) {
}
# Compare port epochs
+ my ($inst_epoch, $tree_epoch) = (0, 0);
$inst =~ s/,(\d+)$//
- and $a = $1;
+ and $inst_epoch = $1;
$tree =~ s/,(\d+)$//
- and $b = $1;
- if (defined($a) || defined($b)) {
- $a = int($a || 0);
- $b = int($b || 0);
- if ($a != $b) {
- return ($a > $b) ? '>' : '<';
- }
+ and $tree_epoch = $1;
+ if ($inst_epoch != $tree_epoch) {
+ return ($inst_epoch > $tree_epoch) ? '>' : '<';
}
# Split it into components