aboutsummaryrefslogtreecommitdiffstats
path: root/ports-mgmt
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2004-10-22 21:50:12 +0800
committerdes <des@FreeBSD.org>2004-10-22 21:50:12 +0800
commit57db63409d634054ce4b098ff55517442e7f43ca (patch)
tree97e5c356e1bde8d18259590f269f2dd99c86c015 /ports-mgmt
parent07048453a1de6758fff636e9e191fb796f7cd9eb (diff)
downloadfreebsd-ports-gnome-57db63409d634054ce4b098ff55517442e7f43ca.tar.gz
freebsd-ports-gnome-57db63409d634054ce4b098ff55517442e7f43ca.tar.zst
freebsd-ports-gnome-57db63409d634054ce4b098ff55517442e7f43ca.zip
Don't croak on port names that contain metacharacters.
Diffstat (limited to 'ports-mgmt')
-rw-r--r--ports-mgmt/porteasy/Makefile2
-rw-r--r--ports-mgmt/porteasy/src/porteasy.pl8
2 files changed, 6 insertions, 4 deletions
diff --git a/ports-mgmt/porteasy/Makefile b/ports-mgmt/porteasy/Makefile
index a255f3aa5b5e..9c4c07e01e75 100644
--- a/ports-mgmt/porteasy/Makefile
+++ b/ports-mgmt/porteasy/Makefile
@@ -8,7 +8,7 @@
#
PORTNAME= porteasy
-PORTVERSION= 2.7.18
+PORTVERSION= 2.7.19
CATEGORIES= misc
MASTER_SITES= # none
DISTFILES= # none
diff --git a/ports-mgmt/porteasy/src/porteasy.pl b/ports-mgmt/porteasy/src/porteasy.pl
index 9cfb1e469a8d..9c2a4875d304 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.18";
+my $VERSION = "2.7.19";
my $COPYRIGHT = "Copyright (c) 2000-2004 Dag-Erling Smørgrav. " .
"All rights reserved.";
@@ -422,8 +422,10 @@ sub find_port($) {
my @suggest; # Suggestions
stderr("Can't find required port '$port'");
- @suggest = grep(/^$port/i, keys(%ports));
- if (@suggest == 1 && $suggest[0] =~ m/^$port[0-9.-]/) {
+ my $portre = $port;
+ $portre =~ s/([^\w])/\\$1/g;
+ @suggest = grep(/^$portre/i, keys(%ports));
+ if (@suggest == 1 && $suggest[0] =~ m/^$portre[0-9.-]/) {
$port = $ports{$suggest[0]};
stderr(", assuming you mean $pkgname{$port}.\n");
return $port;