aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2002-01-21 00:21:41 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2002-01-21 00:21:41 +0000
commit5f336a994597082915113ff5574aa8382c4114ae (patch)
treef575b23dec39462b943e4c83ceb69f51a0d13331 /ports-mgmt
parent97bd3a5c0a21a9aafc7264014471ff5aa0e4c507 (diff)
downloadports-5f336a994597082915113ff5574aa8382c4114ae.tar.gz
ports-5f336a994597082915113ff5574aa8382c4114ae.zip
Notes
Diffstat (limited to 'ports-mgmt')
-rw-r--r--ports-mgmt/porteasy/Makefile2
-rw-r--r--ports-mgmt/porteasy/src/porteasy.pl20
2 files changed, 15 insertions, 7 deletions
diff --git a/ports-mgmt/porteasy/Makefile b/ports-mgmt/porteasy/Makefile
index ef903c031c9c..47aef10cf1ae 100644
--- a/ports-mgmt/porteasy/Makefile
+++ b/ports-mgmt/porteasy/Makefile
@@ -8,7 +8,7 @@
#
PORTNAME= porteasy
-PORTVERSION= 2.6.1
+PORTVERSION= 2.6.2
CATEGORIES= misc
MASTER_SITES= # none
DISTFILES= # none
diff --git a/ports-mgmt/porteasy/src/porteasy.pl b/ports-mgmt/porteasy/src/porteasy.pl
index 2798b02ecc74..2c773e6d75b2 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.6.1";
+my $VERSION = "2.6.2";
my $COPYRIGHT = "Copyright (c) 2000 Dag-Erling Smørgrav. All rights reserved.";
# Constants
@@ -237,7 +237,11 @@ sub cmd($@) {
}
return undef;
}
- return $output || "\n";
+ if ($capture) {
+ $output =~ s/\n*$//s;
+ return $output;
+ }
+ return 1;
}
#
@@ -502,7 +506,8 @@ sub find_library($) {
my $ldconfig; # Output from ldconfig(8)
- $ldconfig = capture(\&cmd, (&PATH_LDCONFIG, "-r"))
+ $ldconfig = capture(\&cmd, (&PATH_LDCONFIG, "-r"));
+ defined($ldconfig)
or errx(1, "unable to run ldconfig");
if ($ldconfig =~ m/^\s*\d+:-l$library => (.*)$/m) {
info("The $library library is installed as $1");
@@ -548,10 +553,13 @@ sub find_dependencies($) {
"-VBUILD_DEPENDS",
"-VRUN_DEPENDS",
"-VLIB_DEPENDS",
- "-VDEPENDS"))
+ "-VDEPENDS"));
+ defined($dependvars)
or bsd::errx(1, "failed to obtain dependency list");
%depends = ();
- foreach $item (split(' ', $dependvars)) {
+ while ($dependvars =~ m/\G\s*((?:[^\s\`]|\`[^\`]+\`)+)/g) {
+ $item = $1;
+ $item =~ s|\`([^\`]+)\`|capture(\&cmd, "sh", "-c", $1)|eg;
if ($item !~ m|^(?:([^:]+):)?$portsdir/([^/:]+/[^/:]+)/?(:[^:]+)?$|) {
bsd::warnx("invalid dependency: %s", $item);
next;
@@ -659,7 +667,7 @@ sub update_ports_tree(@) {
$portname{$port} = $1.$2;
$pkgname{$port} = $3;
} else {
- warnx("failed to obtain package name for $port");
+ bsd::warnx("failed to obtain package name for $port");
}
}