summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2009-11-29 14:07:08 +0000
committerMarc Espie <espie@cvs.openbsd.org>2009-11-29 14:07:08 +0000
commit311e46e6eca3eaa3b17bdb8fe4f1a4d4fbe1b926 (patch)
tree9d49895d1a75d1e6ae5aace878cab51fec7445e9
parent47d4acf1f604bdab91c9651d034cb29e49c9004b (diff)
compute updates on the fly, instead of "at start"
-rw-r--r--usr.sbin/pkg_add/pkg_add13
1 files changed, 3 insertions, 10 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add
index f758d3ff348..7aeee330c8d 100644
--- a/usr.sbin/pkg_add/pkg_add
+++ b/usr.sbin/pkg_add/pkg_add
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_add,v 1.403 2009/11/29 13:19:29 espie Exp $
+# $OpenBSD: pkg_add,v 1.404 2009/11/29 14:07:07 espie Exp $
#
# Copyright (c) 2003-2009 Marc Espie <espie@openbsd.org>
#
@@ -757,17 +757,10 @@ sub finish_display
framework(
sub {
- $state->progress->set_header("Looking for packages");
- $state->{todo} = scalar @todo2;
- for my $set (@todo2) {
- if (!$state->updater->process_set($set, $state)) {
- $set->{finished} = 1;
- }
- $state->{todo}--;
- }
- $state->progress->next;
+ $state->tracker->add_sets(@todo2);
# This is the actual very small loop that adds all packages
while (my $set = shift @todo2) {
+ $state->progress->set_header("Looking for packages");
$state->{todo} = scalar @todo2;
unshift(@todo2, install_set($set, $state));
}