From 02dc9a7bfb4362f2acc14a29b55f233fb330f923 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 8 Jun 2012 18:51:41 +0000 Subject: make some global variables having package scope --- urpm/main_loop.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm index b93023a2..75454328 100644 --- a/urpm/main_loop.pm +++ b/urpm/main_loop.pm @@ -31,6 +31,11 @@ use urpm::get_pkgs; use urpm::signature; use urpm::util qw(difference2 find intersection member partition untaint); +#- global boolean options +my ($auto_select, $no_install, $install_src, $clean, $noclean, $force, $parallel, $test); +#- global counters +my ($ok, $nok); + sub _download_callback { my ($urpm, $callbacks, $raw_msg, $msg) = @_; if (my $download_errors = delete $urpm->{download_errors}) { @@ -225,7 +230,7 @@ sub run { my ($urpm, $state, $something_was_to_be_done, $ask_unselect, $_requested, $callbacks) = @_; #- global boolean options - my ($auto_select, $no_install, $install_src, $clean, $noclean, $force, $parallel, $test) = + ($auto_select, $no_install, $install_src, $clean, $noclean, $force, $parallel, $test) = ($::auto_select, $::no_install, $::install_src, $::clean, $::noclean, $::force, $::parallel, $::test); urpm::get_pkgs::clean_all_cache($urpm) if $clean; @@ -263,7 +268,7 @@ sub run { $options{debug__do_not_install} and exit 0; - my ($ok, $nok) = (0, 0); + ($ok, $nok) = (0, 0); my (@errors, @formatted_errors); my $exit_code = 0; -- cgit v1.2.1