summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-11-29 23:40:14 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-11-29 23:40:14 +0000
commit467c448c9c7cf7f5891256bfd7a16bec3efc5c51 (patch)
tree5ceded1a93bf856bd05d629b4137d20983df1155
parent31d81d6c806b9aea585e9f4e534c51933e995ab2 (diff)
downloadurpmi-467c448c9c7cf7f5891256bfd7a16bec3efc5c51.tar
urpmi-467c448c9c7cf7f5891256bfd7a16bec3efc5c51.tar.gz
urpmi-467c448c9c7cf7f5891256bfd7a16bec3efc5c51.tar.bz2
urpmi-467c448c9c7cf7f5891256bfd7a16bec3efc5c51.tar.xz
urpmi-467c448c9c7cf7f5891256bfd7a16bec3efc5c51.zip
Count total number of installed packages, not per transaction (duh)
-rw-r--r--urpm.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/urpm.pm b/urpm.pm
index fe26511e..06b2942d 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -2856,14 +2856,13 @@ sub install {
} $pkg->files;
close $fh;
};
- $urpm->{nb_install} = scalar keys %$install;
- $urpm->{nb_upgrade} = scalar keys %$upgrade;
- if ($urpm->{nb_install} || $urpm->{nb_upgrade}) {
+ $urpm->{nb_install} += scalar keys %$install;
+ $urpm->{nb_upgrade} += scalar keys %$upgrade;
+ if (scalar keys %$install || scalar keys %$upgrade) {
$options{callback_inst} ||= \&install_logger;
$options{callback_trans} ||= \&install_logger;
}
@l = $trans->run($urpm, %options);
- delete $urpm->{$_} for qw(nb_install nb_upgrade);
#- in case of error or testing, do not try to check rpmdb
#- for packages being upgraded or not.