diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-06-07 12:57:34 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-06-07 12:57:34 +0000 |
commit | dd2493287af9086596bc35e6c6bc6eb4967904c4 (patch) | |
tree | 223e027554ca978b891c70561e659ed8d126c2ab /usr.sbin/pkg_add/OpenBSD/Vstat.pm | |
parent | a2f0f8d9d590394b8bf720bb61d96d766410866b (diff) |
make compute_size explicit. That way, we can do it once, at the right
moment.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/Vstat.pm')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Vstat.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Vstat.pm b/usr.sbin/pkg_add/OpenBSD/Vstat.pm index 0ec95fa5cde..e89a781f071 100644 --- a/usr.sbin/pkg_add/OpenBSD/Vstat.pm +++ b/usr.sbin/pkg_add/OpenBSD/Vstat.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Vstat.pm,v 1.37 2007/06/06 15:36:32 espie Exp $ +# $OpenBSD: Vstat.pm,v 1.38 2007/06/07 12:57:33 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -433,6 +433,11 @@ sub validate_plists OpenBSD::Error::Fatal "fatal issues in ", $self->print; } OpenBSD::Vstat::synchronize(); +} + +sub compute_size +{ + my ($self, $state) = @_; for my $h ($self->older_to_do, $self->newer) { $h->{totsize} = $h->{plist}->compute_size; } |