summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-05-23 10:33:46 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-05-23 10:33:46 +0000
commitf0862252f6ab7c53b105fbc2a89015ce8b206ce2 (patch)
treeb6cd72d10ba4f275b5e9de9595f6b8c6d2baf30e /usr.sbin/pkg_add/OpenBSD/SharedLibs.pm
parentea7bbd52815b4ea7f6ff0aae725f75a65bd2faae (diff)
fiddle with SharedLibs name, put common code into a common place in
pkg_add.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/SharedLibs.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/SharedLibs.pm17
1 files changed, 6 insertions, 11 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm b/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm
index 7c3871843dc..af9faf8cd9e 100644
--- a/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm
+++ b/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: SharedLibs.pm,v 1.15 2007/05/23 09:27:27 espie Exp $
+# $OpenBSD: SharedLibs.pm,v 1.16 2007/05/23 10:33:45 espie Exp $
#
# Copyright (c) 2003-2005 Marc Espie <espie@openbsd.org>
#
@@ -100,7 +100,7 @@ sub system_dirs
return ("/usr", "/usr/X11R6");
}
-sub add_system_libs
+sub add_libs_from_system
{
my ($destdir) = @_;
return if $done_plist->{'system'};
@@ -114,9 +114,9 @@ sub add_system_libs
}
}
-sub add_package_libs
+sub add_libs_from_installed_package
{
- my ($pkgname, $wantpath) = @_;
+ my $pkgname = shift;
return if $done_plist->{$pkgname};
$done_plist->{$pkgname} = 1;
my $plist = OpenBSD::PackingList->from_installation($pkgname,
@@ -125,18 +125,13 @@ sub add_package_libs
Warn "Can't read plist for $pkgname\n";
return;
}
- if (defined $wantpath) {
- if (defined $plist->{extrainfo}) {
- $pkgname = $plist->{extrainfo}->{subdir};
- }
- }
$plist->mark_available_lib($pkgname);
}
-sub add_plist_libs
+sub add_libs_from_plist
{
- my ($plist) = @_;
+ my $plist = shift;
my $pkgname = $plist->pkgname;
return if $done_plist->{$pkgname};
$done_plist->{$pkgname} = 1;