summaryrefslogtreecommitdiffstats
path: root/urpm/main_loop.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-06-08 18:51:46 +0000
committerThierry Vignaud <tv@mageia.org>2012-06-08 18:51:46 +0000
commitcbe40c51e61163d3e73dd2832fd7ea62beba60db (patch)
tree436f91b4253fc01f82f84c62ddd5aa9c2caf0bb1 /urpm/main_loop.pm
parent999eddab7444c6157c0b2bddfb97fb33f813f981 (diff)
downloadurpmi-cbe40c51e61163d3e73dd2832fd7ea62beba60db.tar
urpmi-cbe40c51e61163d3e73dd2832fd7ea62beba60db.tar.gz
urpmi-cbe40c51e61163d3e73dd2832fd7ea62beba60db.tar.bz2
urpmi-cbe40c51e61163d3e73dd2832fd7ea62beba60db.tar.xz
urpmi-cbe40c51e61163d3e73dd2832fd7ea62beba60db.zip
one less variable to pass around
Diffstat (limited to 'urpm/main_loop.pm')
-rw-r--r--urpm/main_loop.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm
index a7bd5e04..f63e9d99 100644
--- a/urpm/main_loop.pm
+++ b/urpm/main_loop.pm
@@ -35,6 +35,7 @@ use urpm::util qw(difference2 find intersection member partition untaint);
my ($auto_select, $no_install, $install_src, $clean, $noclean, $force, $parallel, $test);
#- global counters
my ($ok, $nok);
+my $exit_code;
sub _download_callback {
my ($urpm, $callbacks, $raw_msg, $msg) = @_;
@@ -148,7 +149,7 @@ sub _install_src {
}
sub _continue_on_error {
- my ($urpm, $callbacks, $msgs, $error_sources, $formatted_errors, $exit_code) = @_;
+ my ($urpm, $callbacks, $msgs, $error_sources, $formatted_errors) = @_;
my $go_on;
if ($urpm->{options}{auto}) {
push @$formatted_errors, @$msgs;
@@ -161,7 +162,7 @@ sub _continue_on_error {
if (!$go_on) {
my @missing = grep { $_->[1] eq 'missing' } @$error_sources;
if (@missing) {
- $$exit_code = $ok ? 13 : 14;
+ $exit_code = $ok ? 13 : 14;
}
return 0;
}
@@ -270,7 +271,7 @@ sub run {
($ok, $nok) = (0, 0);
my (@errors, @formatted_errors);
- my $exit_code = 0;
+ $exit_code = 0;
my $migrate_back_rpmdb_db_version =
$urpm->{root} && urpm::select::should_we_migrate_back_rpmdb_db_version($urpm, $state);
@@ -288,7 +289,7 @@ sub run {
my ($error_sources, $msgs) = _download_packages($urpm, $callbacks, $transaction_blists, $transaction_sources);
if (@$error_sources) {
$nok++;
- last if !_continue_on_error($urpm, $callbacks, $msgs, $error_sources, \@formatted_errors, \$exit_code);
+ last if !_continue_on_error($urpm, $callbacks, $msgs, $error_sources, \@formatted_errors);
}
$callbacks->{post_download} and $callbacks->{post_download}->();