diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-08-06 12:21:12 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-08-06 12:21:12 +0000 |
commit | 6c1be8b130d21514db574383672fd9d67bf010fe (patch) | |
tree | 9a5b593897630c8fffbde57d7430bf5f22767ee1 /usr.sbin/pkg_add/pkg_delete | |
parent | 1f84ea29234d077d429098269548eda8a647264a (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_delete | 8 |
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); } } |