# ex:ts=8 sw=4:
-# $OpenBSD: Add.pm,v 1.165 2015/03/29 09:42:58 espie Exp $
+# $OpenBSD: Add.pm,v 1.166 2015/05/18 10:41:19 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
my ($handle, $state) = @_;
$state->{partial} = $handle->{partial};
- $state->progress->visit_with_size($handle->{plist}, 'install', $state);
+ $state->progress->visit_with_size($handle->{plist}, 'install');
if ($handle->{location}{early_close}) {
$handle->{location}->close_now;
} else {
# ex:ts=8 sw=4:
-# $OpenBSD: Delete.pm,v 1.142 2014/11/30 15:53:26 espie Exp $
+# $OpenBSD: Delete.pm,v 1.143 2015/05/18 10:41:19 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
if (!$state->{size_only}) {
$plist->register_manpage($state, 'rmman');
manpages_unindex($state);
- $state->progress->visit_with_size($plist, 'delete', $state);
+ $state->progress->visit_with_size($plist, 'delete');
}
unregister_dependencies($plist, $state);
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgCreate.pm,v 1.115 2015/05/18 10:37:12 espie Exp $
+# $OpenBSD: PkgCreate.pm,v 1.116 2015/05/18 10:41:20 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
{
my ($self, $state, $plist) = @_;
my $p2 = OpenBSD::PackingList->new;
- $state->progress->visit_with_count($plist, 'makesum_plist', $state, $p2);
+ $state->progress->visit_with_count($plist, 'makesum_plist', $p2);
$p2->set_infodir($plist->infodir);
return $p2;
}
$self->check_dependencies($plist, $state);
$state->set_status("checksumming");
if ($regen_package) {
- $state->progress->visit_with_count($plist, 'verify_checksum', $state);
+ $state->progress->visit_with_count($plist, 'verify_checksum');
} else {
$plist = $self->make_plist_with_sum($state, $plist);
}
# ex:ts=8 sw=4:
-# $OpenBSD: ProgressMeter.pm,v 1.46 2015/05/18 10:25:10 espie Exp $
+# $OpenBSD: ProgressMeter.pm,v 1.47 2015/05/18 10:41:20 espie Exp $
#
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
#
sub visit_with_size
{
my ($progress, $plist, $method, @r) = @_;
- $plist->$method(@r);
+ $plist->$method($progress->{state}, @r);
}
sub visit_with_count
# ex:ts=8 sw=4:
-# $OpenBSD: Term.pm,v 1.31 2015/05/18 10:25:10 espie Exp $
+# $OpenBSD: Term.pm,v 1.32 2015/05/18 10:41:20 espie Exp $
#
# Copyright (c) 2004-2007 Marc Espie <espie@openbsd.org>
#
sub visit_with_size
{
- my ($progress, $plist, $method, $state, @r) = @_;
+ my ($progress, $plist, $method, @r) = @_;
my $p = $progress->new_sizer($plist);
$plist->size_and($p, $method, $progress->{state}, @r);
}
my $count = 0;
$progress->show($count, $plist->{total});
$plist->count_and($progress, \$count, $plist->{total},
- $method, @r);
+ $method, $progress->{state}, @r);
}
package OpenBSD::ProgressMeter::Term;