From 78931ed8088172f7f9061da28cb73905303b692a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Fri, 23 May 2003 00:21:11 +0000 Subject: Fix a bug in the version number comparison code caused by careless use of the magic variabled $a and $b. Also fix a markup nit in the man page. --- ports-mgmt/porteasy/Makefile | 2 +- ports-mgmt/porteasy/src/porteasy.8 | 4 ++-- ports-mgmt/porteasy/src/porteasy.pl | 15 ++++++--------- 3 files changed, 9 insertions(+), 12 deletions(-) (limited to 'ports-mgmt/porteasy') diff --git a/ports-mgmt/porteasy/Makefile b/ports-mgmt/porteasy/Makefile index 2872db96fd32..38731390b3a1 100644 --- a/ports-mgmt/porteasy/Makefile +++ b/ports-mgmt/porteasy/Makefile @@ -8,7 +8,7 @@ # PORTNAME= porteasy -PORTVERSION= 2.7.6 +PORTVERSION= 2.7.7 CATEGORIES= misc MASTER_SITES= # none DISTFILES= # none diff --git a/ports-mgmt/porteasy/src/porteasy.8 b/ports-mgmt/porteasy/src/porteasy.8 index 1fd24d022ce5..844342259339 100644 --- a/ports-mgmt/porteasy/src/porteasy.8 +++ b/ports-mgmt/porteasy/src/porteasy.8 @@ -27,14 +27,14 @@ .\" .\" $FreeBSD$ .\" -.Dd June 9, 2001 +.Dd May 23, 2003 .Dt PORTEASY 8 .Os .Sh NAME .Nm porteasy .Nd fetch and build ports .Sh SYNOPSIS -.Nm porteasy +.Nm .Op Fl abCceFfhIikLlsuVvw .Op Fl D Ar date .Op Fl d Ar dir 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 -- cgit v1.2.3