From 60de791955c6920a444e3942e91ab22fd4c19438 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Tue, 3 Jan 2006 17:35:45 +0000 Subject: Count failed transactions, so when displaying counter you don't get an off-by-one error at the end if a transaction failed. --- urpmi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/urpmi b/urpmi index 66923bfe..e77a9161 100755 --- a/urpmi +++ b/urpmi @@ -694,6 +694,7 @@ foreach my $set (@{$state->{transaction} || []}) { message(N("Installation failed") . ":\n" . join("\n", map { "\t$_" } @l)); if ($urpm->{options}{auto} || !$urpm->{options}{'allow-nodeps'} && !$urpm->{options}{'allow-force'}) { ++$nok; + ++$urpm->{logger_id}; push @errors, @l; } else { my $noexpr = N("Nn"); @@ -713,6 +714,7 @@ foreach my $set (@{$state->{transaction} || []}) { message(N("Installation failed") . ":\n" . join("\n", map { "\t$_" } @l)); if (!$urpm->{options}{'allow-force'}) { ++$nok; + ++$urpm->{logger_id}; push @errors, @l; } else { message_input(N("Try harder to install (--force)? (y/N) "), @@ -729,6 +731,7 @@ foreach my $set (@{$state->{transaction} || []}) { #- Warning : the following message is parsed in urpm::parallel_* message(N("Installation failed") . ":\n" . join("\n", map { "\t$_" } @l)); ++$nok; + ++$urpm->{logger_id}; push @errors, @l; } else { ++$ok; -- cgit v1.2.1