# 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>
#
$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;
# 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>
#
$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) = @_;
# 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>
#
}
}
-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;
# 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>
#
$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;
#! /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>
#
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}) {