summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Add.pm5
-rw-r--r--usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm31
-rw-r--r--usr.sbin/pkg_add/OpenBSD/AddDelete.pm20
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Delete.pm5
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgCreate.pm5
5 files changed, 27 insertions, 39 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm
index 68b391fa55a..1df52e1a9bf 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.151 2014/04/18 10:00:48 schwarze Exp $
+# $OpenBSD: Add.pm,v 1.152 2014/05/20 05:46:13 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -40,8 +40,7 @@ sub manpages_index
$state->say("Merging manpages in #1: #2",
$destdir.$k, join(' ', @l)) if $state->verbose;
} else {
- $state->vsystem(OpenBSD::Paths->makewhatis,
- '-d', $destdir.$k, '--', @l);
+ $state->run_makewhatis(['-d', $destdir.$k], \@l);
}
}
$state->{v} = $v;
diff --git a/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm b/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm
index 90539c6f564..258e3caf36c 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.22 2014/01/17 10:55:01 espie Exp $
+# $OpenBSD: AddCreateDelete.pm,v 1.23 2014/05/20 05:46:13 espie Exp $
#
# Copyright (c) 2007-2014 Marc Espie <espie@openbsd.org>
#
@@ -71,25 +71,34 @@ sub handle_options
$state->{not} = $state->opt('n');
}
-# those are required for makewhatis integration
-sub picky
+sub vsystem
{
- return shift->{picky};
+ my $self = shift;
+ my $verbose = $self;
+ if ($self->verbose < 2) {
+ $self->system(@_);
+ } else {
+ $self->verbose_system(@_);
+ }
}
-sub testmode
+sub system
{
- return shift->{testmode};
+ my $self = shift;
+ $self->progress->clear;
+ $self->SUPER::system(@_);
}
-sub check_dir
+sub run_makewhatis
{
- my ($self, $dir) = @_;
- unless (-d $dir) {
- $self->fatal("#1: #2 is not a directory", $0, $dir);
+ my ($state, $opts, $l) = @_;
+ while (@$l > 1000) {
+ my @b = splice(@$l, 0, 1000);
+ $state->vsystem(OpenBSD::Paths->makewhatis, @$opts, '--', @b);
}
-}
+ $state->vsystem(OpenBSD::Paths->makewhatis, @$opts, '--', @$l);
+}
sub ntogo
{
my ($self, $offset) = @_;
diff --git a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm
index 1ec617707d9..2839235ffca 100644
--- a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm
+++ b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: AddDelete.pm,v 1.61 2014/03/18 18:53:29 espie Exp $
+# $OpenBSD: AddDelete.pm,v 1.62 2014/05/20 05:46:13 espie Exp $
#
# Copyright (c) 2007-2010 Marc Espie <espie@openbsd.org>
#
@@ -308,24 +308,6 @@ sub run_quirks
}
}
-sub vsystem
-{
- my $self = shift;
- my $verbose = $self;
- if ($self->verbose < 2) {
- $self->system(@_);
- } else {
- $self->verbose_system(@_);
- }
-}
-
-sub system
-{
- my $self = shift;
- $self->progress->clear;
- $self->SUPER::system(@_);
-}
-
sub check_root
{
my $state = shift;
diff --git a/usr.sbin/pkg_add/OpenBSD/Delete.pm b/usr.sbin/pkg_add/OpenBSD/Delete.pm
index 2e97089094d..dd4973c8401 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.135 2014/04/18 10:00:48 schwarze Exp $
+# $OpenBSD: Delete.pm,v 1.136 2014/05/20 05:46:13 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -54,8 +54,7 @@ sub manpages_unindex
$state->say("Removing manpages in #1: #2",
$destdir.$k, join(' ', @l)) if $state->verbose;
} else {
- $state->vsystem(OpenBSD::Paths->makewhatis,
- '-u', $destdir.$k, '--', @l);
+ $state->run_makewhatis(['-u', $destdir.$k], \@l);
}
}
$state->{v} = $v;
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
index 8323baea297..2e9b61d6c01 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgCreate.pm,v 1.105 2014/04/18 10:00:48 schwarze Exp $
+# $OpenBSD: PkgCreate.pm,v 1.106 2014/05/20 05:46:13 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -1283,8 +1283,7 @@ sub finish_manpages
my ($self, $state, $plist) = @_;
$plist->grab_manpages($state);
if (defined $state->{manpages}) {
- $state->system(OpenBSD::Paths->makewhatis, '-t', '--',
- @{$state->{manpages}});
+ $state->run_makewhatis(['-t'], $state->{manpages});
}
if (defined $state->{mandir}) {