From: espie Date: Sat, 24 Jul 2010 10:49:01 +0000 (+0000) Subject: pass state to Makewhatis. With new hooks in there, that means display X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=de0981a89423869e95b7601ea09cfa393a371218;p=openbsd pass state to Makewhatis. With new hooks in there, that means display will integrate with pkg_add output (no more disturbed error messages from wrong subject lines) --- diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm index c0ef2da6dd0..451c18297e2 100644 --- a/usr.sbin/pkg_add/OpenBSD/Add.pm +++ b/usr.sbin/pkg_add/OpenBSD/Add.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Add.pm,v 1.113 2010/06/30 10:51:04 espie Exp $ +# $OpenBSD: Add.pm,v 1.114 2010/07/24 10:49:01 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie # @@ -39,7 +39,8 @@ sub manpages_index $destdir.$k, join(@l)) if $state->verbose >= 2; } else { try { - OpenBSD::Makewhatis::merge($destdir.$k, \@l); + OpenBSD::Makewhatis::merge($destdir.$k, \@l, + $state); } catchall { $state->errsay("Error in makewhatis: #1", $_); }; diff --git a/usr.sbin/pkg_add/OpenBSD/Delete.pm b/usr.sbin/pkg_add/OpenBSD/Delete.pm index bc1dd2414d9..73a76991365 100644 --- a/usr.sbin/pkg_add/OpenBSD/Delete.pm +++ b/usr.sbin/pkg_add/OpenBSD/Delete.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Delete.pm,v 1.105 2010/06/30 10:51:04 espie Exp $ +# $OpenBSD: Delete.pm,v 1.106 2010/07/24 10:49:01 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie # @@ -52,7 +52,8 @@ sub manpages_unindex $state->say("Removing manpages in #1: #2", $destdir.$k, join(@l)) if $state->verbose >= 2; } else { - eval { OpenBSD::Makewhatis::remove($destdir.$k, \@l); }; + eval { OpenBSD::Makewhatis::remove($destdir.$k, \@l, + $state); }; if ($@) { $state->errsay("Error in makewhatis: #1", $@); } @@ -309,6 +310,8 @@ package OpenBSD::PackingElement::DirBase; sub prepare_for_deletion { my ($self, $state, $pkgname) = @_; + my $fname = $state->{destdir}.$self->fullname; + $state->vstat->remove_directory($fname); return unless $self->{noshadow}; $state->{noshadow}->{$state->{destdir}.$self->fullname} = 1; }