summaryrefslogtreecommitdiffstats
path: root/ports-mgmt
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2002-01-21 00:21:41 +0000
committerdes <des@FreeBSD.org>2002-01-21 00:21:41 +0000
commitd7cb7e7613d891a583313b56f0a9dd5da65bec26 (patch)
tree78b742358c8a3e768c1c91c8c3b0d608d3b10c88 /ports-mgmt
parent713945d13e4824b1acf9d6512ae72e5d2fa09e1d (diff)
downloadFreeBSD-ports-d7cb7e7613d891a583313b56f0a9dd5da65bec26.zip
FreeBSD-ports-d7cb7e7613d891a583313b56f0a9dd5da65bec26.tar.gz
Support dependencies that have backtick expressions in them, and fix a few
related nits. Bump version to 2.6.2.
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 ef903c0..47aef10 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 2798b02..2c773e6 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");
}
}
OpenPOWER on IntegriCloud