aboutsummaryrefslogtreecommitdiff
path: root/misc/porteasy
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2002-03-07 23:24:23 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2002-03-07 23:24:23 +0000
commite1bd382c0e0754f2625b285c1c89d5b87d87182d (patch)
tree7fbb69d569bf6640d6e530c95cb4a5099c7ea906 /misc/porteasy
parent41dbe8a305f4bcc0dcae4e0e9ddda6b7a23a793d (diff)
downloadports-e1bd382c0e0754f2625b285c1c89d5b87d87182d.tar.gz
ports-e1bd382c0e0754f2625b285c1c89d5b87d87182d.zip
Notes
Diffstat (limited to 'misc/porteasy')
-rw-r--r--misc/porteasy/Makefile2
-rw-r--r--misc/porteasy/src/porteasy.pl23
2 files changed, 7 insertions, 18 deletions
diff --git a/misc/porteasy/Makefile b/misc/porteasy/Makefile
index 2c4811806e0d..44e86da37c11 100644
--- a/misc/porteasy/Makefile
+++ b/misc/porteasy/Makefile
@@ -8,7 +8,7 @@
#
PORTNAME= porteasy
-PORTVERSION= 2.7.1
+PORTVERSION= 2.7.2
CATEGORIES= misc
MASTER_SITES= # none
DISTFILES= # none
diff --git a/misc/porteasy/src/porteasy.pl b/misc/porteasy/src/porteasy.pl
index 20817d410dba..6fd4eced5205 100644
--- a/misc/porteasy/src/porteasy.pl
+++ b/misc/porteasy/src/porteasy.pl
@@ -33,7 +33,7 @@ use strict;
use Fcntl;
use Getopt::Long;
-my $VERSION = "2.7.1";
+my $VERSION = "2.7.2";
my $COPYRIGHT = "Copyright (c) 2000-2002 Dag-Erling Smørgrav. " .
"All rights reserved.";
@@ -80,7 +80,6 @@ my $need_deps; # Need dependency information
my $have_index; # Index has been read
my %ports; # Maps ports to their directory.
my %pkgname; # Inverse of the above map
-my %portname; # Port names (including prefix, but no version)
my %masterport; # Maps ports to their master ports
my %reqd; # Ports that need to be installed
my %have_dep; # Dependencies that are already present
@@ -444,9 +443,6 @@ sub add_installed() {
next if ($port eq "." || $port eq ".." || ! -d "$dbdir/$port");
if (!defined($origin = get_origin($port))) {
bsd::warn("$port has no \@origin line\n");
- if (!$have_index) {
- read_index();
- }
if (!defined($origin = $ports{$port})) {
bsd::warnx("installed port %s is unknown", $port);
}
@@ -677,11 +673,9 @@ sub update_ports_tree(@) {
# Find the port's package name
if (!exists($pkgname{$port})) {
- $makev = capture(\&make, ($port, "-VPKGNAMEPREFIX",
- "-VPORTNAME", "-VPKGNAME"));
- if ($makev =~ m/^(\S*)\n(\S+)\n(\S+)\n?$/s) {
- $portname{$port} = $1.$2;
- $pkgname{$port} = $3;
+ $makev = capture(\&make, ($port, "-VPKGNAME"));
+ if ($makev =~ m/^\s*(\S+)\s*$/s) {
+ $pkgname{$port} = $1;
} else {
bsd::warnx("failed to obtain package name for $port");
}
@@ -824,11 +818,6 @@ sub cmp_version($$) {
return '=';
}
- # Isolate the version number
- if (substr($inst, 0, length($portname{$port})) ne $portname{$port}) {
- return '?';
- }
-
# Compare port epochs
if ((($a) = ($inst =~ m/,(\d+)$/)) ||
(($b) = ($pkgname{$port} =~ m/,(\d+)$/))) {
@@ -840,8 +829,8 @@ sub cmp_version($$) {
}
# Split it into components
- my @a = split('.', substr($inst, length($portname{$port})));
- my @b = split('.', substr($pkgname{$port}, length($portname{$port})));
+ my @a = split(/[\._-]/, $inst);
+ my @b = split(/[\._-]/, $pkgname{$port});
# Compare the components one by one
while (@a && @b) {