summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2014-06-03 13:13:53 +0000
committerespie <espie@openbsd.org>2014-06-03 13:13:53 +0000
commite86ad7fef11a956af1652001b829d5a3eb15ec89 (patch)
treea8d8489882e492573049cf2a35c4316fc7276fff
parentBetter comment for `faulty address'. (diff)
downloadwireguard-openbsd-e86ad7fef11a956af1652001b829d5a3eb15ec89.tar.xz
wireguard-openbsd-e86ad7fef11a956af1652001b829d5a3eb15ec89.zip
as miod found out, mandocdb is slightly intrusive and wants to know where
you live (e.g., it expects to be able to get back to the directory it started from, even when this one wasn't readable in the first place). Do an extra chdir('/') to try to sidestep the issue.
-rw-r--r--usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm b/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm
index ea2e69afd7b..554dfe0380f 100644
--- a/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm
+++ b/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: AddCreateDelete.pm,v 1.24 2014/05/20 05:55:43 espie Exp $
+# $OpenBSD: AddCreateDelete.pm,v 1.25 2014/06/03 13:13:53 espie Exp $
#
# Copyright (c) 2007-2014 Marc Espie <espie@openbsd.org>
#
@@ -91,13 +91,16 @@ sub system
sub run_makewhatis
{
my ($state, $opts, $l) = @_;
+ my $braindead = sub { chdir('/'); };
while (@$l > 1000) {
my @b = splice(@$l, 0, 1000);
- $state->vsystem(OpenBSD::Paths->makewhatis, @$opts, '--', @b);
+ $state->vsystem($braindead,
+ OpenBSD::Paths->makewhatis, @$opts, '--', @b);
}
- $state->vsystem(OpenBSD::Paths->makewhatis, @$opts, '--', @$l);
-
+ $state->vsystem($braindead,
+ OpenBSD::Paths->makewhatis, @$opts, '--', @$l);
}
+
sub ntogo
{
my ($self, $offset) = @_;