summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-10-26 17:25:37 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-10-26 17:25:37 +0000
commit531dc8b34f62f65f40574880bb8d2295a2f95008 (patch)
tree3c1cdc8021ee4009834ab90d13bc3210bf98e473 /usr.sbin/pkg_add
parente1a97262226ada8cc458bcb6ef66443fe593135d (diff)
more accurate name: DirRmOnly -> SharedItemsOnly
use a visitor instead of hardcoding items/users/groups.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingList.pm9
-rw-r--r--usr.sbin/pkg_add/OpenBSD/SharedItems.pm4
2 files changed, 9 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingList.pm b/usr.sbin/pkg_add/OpenBSD/PackingList.pm
index 5c92e716ae9..a6b6e60bb49 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackingList.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackingList.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackingList.pm,v 1.29 2004/10/23 11:09:22 espie Exp $
+# $OpenBSD: PackingList.pm,v 1.30 2004/10/26 17:25:36 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -61,7 +61,7 @@ sub defaultCode
}
}
-sub DirrmOnly
+sub SharedItemsOnly
{
my ($fh, $cont) = @_;
local $_;
@@ -71,6 +71,11 @@ sub DirrmOnly
}
}
+sub DirrmOnly
+{
+ &OpenBSD::PackingList::SharedItemsOnly;
+}
+
sub LibraryOnly
{
my ($fh, $cont) = @_;
diff --git a/usr.sbin/pkg_add/OpenBSD/SharedItems.pm b/usr.sbin/pkg_add/OpenBSD/SharedItems.pm
index b33d5d469ed..1d3b3face14 100644
--- a/usr.sbin/pkg_add/OpenBSD/SharedItems.pm
+++ b/usr.sbin/pkg_add/OpenBSD/SharedItems.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: SharedItems.pm,v 1.1 2004/10/26 17:23:15 espie Exp $
+# $OpenBSD: SharedItems.pm,v 1.2 2004/10/26 17:25:36 espie Exp $
#
# Copyright (c) 2004 Marc Espie <espie@openbsd.org>
#
@@ -33,7 +33,7 @@ sub record_all
my $done = 0;
for my $e (@list) {
OpenBSD::ProgressMeter::show($done, $total);
- my $plist = OpenBSD::PackingList->fromfile(installed_info($e).CONTENTS, \&OpenBSD::PackingList::DirrmOnly) or next;
+ my $plist = OpenBSD::PackingList->fromfile(installed_info($e).CONTENTS, \&OpenBSD::PackingList::SharedItemsOnly) or next;
$plist->visit('record_shared_item', $e, $db);
$done++;
}