diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-08-02 12:12:37 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-08-02 12:12:37 +0000 |
commit | fe1130822ba2906b4cb487c90b4d6055c81250a5 (patch) | |
tree | 858f436b1af7857c22ea961a7980a2c1c917871c /usr.sbin/pkg_add/pkg_delete | |
parent | efa379bc32ae3c2e62eda2303fc862a8739b5025 (diff) |
@man type file for manpages.
Diffstat (limited to 'usr.sbin/pkg_add/pkg_delete')
-rw-r--r-- | usr.sbin/pkg_add/pkg_delete | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete index e1d42b11723..80500b05761 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.27 2004/07/20 18:58:41 espie Exp $ +# $OpenBSD: pkg_delete,v 1.28 2004/08/02 12:12:36 espie Exp $ # # Copyright (c) 2003 Marc Espie. # @@ -277,6 +277,16 @@ sub remove_packing_info rmdir($dir) or die "Can't finish removing directory $dir: $!"; } +sub manpages_unindex +{ + my ($plist, $destdir) = @_; + return unless defined $plist->{state}->{mandirs}; + while (my ($k, $v) = each %{$plist->{state}->{mandirs}}) { + system("/usr/libexec/makewhatis", "-u", $destdir.$k, + map { $destdir.$_ } @$v); + } +} + sub delete_package { my ($pkgname, $state) = @_; @@ -312,6 +322,7 @@ sub delete_package if ($plist->has(DEINSTALL)) { $plist->get(DEINSTALL)->delete($state); } + manpages_unindex($plist, $state->{destdir}); for my $item (@{$plist->{items}}) { $item->delete($state); } |