diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-10-15 01:19:48 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-10-15 01:19:48 +0000 |
commit | 8b45fb5ff2725af620f263efaeddec20277d2675 (patch) | |
tree | 88b685da13ad8d3d078a3ca18fc2da6b5f89f3fc /ports-mgmt | |
parent | 3d2480100488589d172cdbe8d390aa3f47e1878b (diff) | |
download | ports-8b45fb5ff2725af620f263efaeddec20277d2675.tar.gz ports-8b45fb5ff2725af620f263efaeddec20277d2675.zip |
Notes
Diffstat (limited to 'ports-mgmt')
-rw-r--r-- | ports-mgmt/porteasy/Makefile | 2 | ||||
-rw-r--r-- | ports-mgmt/porteasy/src/porteasy.pl | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/ports-mgmt/porteasy/Makefile b/ports-mgmt/porteasy/Makefile index 8518d8215ea9..c7c9faa3ed8e 100644 --- a/ports-mgmt/porteasy/Makefile +++ b/ports-mgmt/porteasy/Makefile @@ -8,7 +8,7 @@ # PORTNAME= porteasy -PORTVERSION= 2.7.3 +PORTVERSION= 2.7.4 CATEGORIES= misc MASTER_SITES= # none DISTFILES= # none diff --git a/ports-mgmt/porteasy/src/porteasy.pl b/ports-mgmt/porteasy/src/porteasy.pl index 199f9f5f214b..3ee5793aab2f 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.3"; +my $VERSION = "2.7.4"; my $COPYRIGHT = "Copyright (c) 2000-2002 Dag-Erling Smørgrav. " . "All rights reserved."; @@ -461,7 +461,6 @@ sub find_master($) { my $port = shift; # Port local *FILE; # File handle - my $master; # Master directory if ($masterport{$port}) { return $masterport{$port}; @@ -473,6 +472,8 @@ sub find_master($) { open(FILE, "$portsdir/$port/Makefile") or bsd::err(1, "unable to read Makefile for $port"); while (<FILE>) { + my $master; # Master directory + if (/^(?:MAIN|MASTER)DIR\s*=\s*(\S+)\s*$/) { $master = $1; } elsif (/^\.?include \"([^\"]+)\/Makefile(?:[^\/\"]*)\"\s*$/) { @@ -484,8 +485,13 @@ sub find_master($) { $master =~ s|/+|/|g; 1 while ($master =~ s|/[^\./]*/\.\./|/|); $master =~ s|^/||; + $master =~ s|/$||; + if ($master eq $port) { + bsd::warnx("master port heuristics failed for %s", $port); + next; + } if ($master !~ m|^[^/]+/[^/]+$|) { - bsd::warn("invalid master for %s: %s", $port, $master); + bsd::warnx("invalid master for %s: %s", $port, $master); next; } close(FILE); |