summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/pkg_delete
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-08-06 12:21:12 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-08-06 12:21:12 +0000
commit6c1be8b130d21514db574383672fd9d67bf010fe (patch)
tree9a5b593897630c8fffbde57d7430bf5f22767ee1 /usr.sbin/pkg_add/pkg_delete
parent1f84ea29234d077d429098269548eda8a647264a (diff)
use OpenBSD::Makewhatis, avoid forking extra makewhatis.
Note: requires you to update makewhatis to work.
Diffstat (limited to 'usr.sbin/pkg_add/pkg_delete')
-rw-r--r--usr.sbin/pkg_add/pkg_delete8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete
index 48c24d0847e..db2dc801567 100644
--- a/usr.sbin/pkg_add/pkg_delete
+++ b/usr.sbin/pkg_add/pkg_delete
@@ -1,6 +1,6 @@
#!/usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_delete,v 1.34 2004/08/06 10:23:45 espie Exp $
+# $OpenBSD: pkg_delete,v 1.35 2004/08/06 12:21:11 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -355,9 +355,11 @@ sub manpages_unindex
{
my ($plist, $destdir) = @_;
return unless defined $plist->{state}->{mandirs};
+ require OpenBSD::Makewhatis;
+
while (my ($k, $v) = each %{$plist->{state}->{mandirs}}) {
- system("/usr/libexec/makewhatis", "-u", $destdir.$k,
- map { $destdir.$_ } @$v);
+ my @l = map { $destdir.$_ } @$v;
+ OpenBSD::Makewhatis::remove($destdir.$k, \@l);
}
}