summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-08-07 17:27:27 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-08-07 17:27:27 +0000
commit9e008ede18662aa6884720b282eb1331d69c9d14 (patch)
treeb36ab66166b49c605e5554f5f5f0bd1b81214375 /usr.sbin/pkg_add/OpenBSD/PackingElement.pm
parent0e899b1d93fdc1bd2f512468a519df445aba2d0c (diff)
use chroot DESTDIR ldconfig in DESTDIR case.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackingElement.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
index f43c1350205..cf11c2d181a 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackingElement.pm,v 1.19 2004/08/06 10:23:45 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.20 2004/08/07 17:27:26 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -355,7 +355,7 @@ sub keyword() { "lib" }
our $todo;
my $path;
-our $ldconfig = '/sbin/ldconfig';
+our @ldconfig = ('/sbin/ldconfig');
sub add_ldconfig_dirs()
{
@@ -372,7 +372,10 @@ sub mark_ldconfig_directory
my ($self, $destdir) = @_;
if (!defined $path) {
$path={};
- open my $fh, "-|", $ldconfig, "-r";
+ if ($destdir ne '') {
+ unshift @ldconfig, 'chroot', $destdir;
+ }
+ open my $fh, "-|", @ldconfig, "-r";
if (defined $fh) {
local $_;
while (<$fh>) {