diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-07-02 14:21:17 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-07-02 14:21:17 +0000 |
commit | 43f0942f8e4a865d26817e365f23d20095868fe4 (patch) | |
tree | 26575725ea4758ade01010dd1abe29aa058f224e /urpme | |
parent | 04f532da620735a0c92dac47ff699fa26d14b8db (diff) | |
download | urpmi-43f0942f8e4a865d26817e365f23d20095868fe4.tar urpmi-43f0942f8e4a865d26817e365f23d20095868fe4.tar.gz urpmi-43f0942f8e4a865d26817e365f23d20095868fe4.tar.bz2 urpmi-43f0942f8e4a865d26817e365f23d20095868fe4.tar.xz urpmi-43f0942f8e4a865d26817e365f23d20095868fe4.zip |
cleanup var name
Diffstat (limited to 'urpme')
-rw-r--r-- | urpme | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -31,7 +31,7 @@ use urpm::select; $ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin"; delete @ENV{qw(ENV BASH_ENV IFS CDPATH)}; -our ($test, $parallel, $auto, $matches, $force, $noscripts, $repackage, @l, $restricted); +our ($test, $parallel, $auto, $matches, $force, $noscripts, $repackage, $restricted); my $yesexpr = #-PO: Add here the keys which might be pressed in the "Yes"-case. N("Yy"); @@ -62,7 +62,7 @@ usage: @ARGV or usage(); my @origARGV = @ARGV; my $urpm = urpm->new_parse_cmdline or exit(1); -@l = @ARGV; +my @cmdline_pkgs_to_remove = @ARGV; my $state = {}; @@ -91,7 +91,7 @@ urpm::media::configure($urpm, #- examine packages... my @toremove = urpm::select::find_packages_to_remove($urpm, $state, - \@l, + \@cmdline_pkgs_to_remove, matches => $matches, force => $force, callback_notfound => sub { @@ -119,7 +119,7 @@ if ($test && $auto) { #- Warning : the following message is parsed in urpm::parallel_* my $msg = N("Checking to remove the following packages"); print STDOUT "$msg:\n$list\n"; -} elsif (($parallel || @toremove > @l) && !$auto) { +} elsif (($parallel || @toremove > @cmdline_pkgs_to_remove) && !$auto) { my $msg = P("To satisfy dependencies, the following package will be removed", "To satisfy dependencies, the following %d packages will be removed", @@ -130,7 +130,7 @@ if ($test && $auto) { #- Warning : the following message is parsed in urpm::parallel_* print N("removing %s", join(' ', sort @toremove)) . "\n"; -@l = $parallel +my @errors = $parallel ? urpm::parallel::remove($urpm, \@toremove, test => $test, @@ -146,5 +146,7 @@ print N("removing %s", join(' ', sort @toremove)) . "\n"; repackage => $repackage || $urpm->{options}{repackage}, ); -#- Warning : the following message is parsed in urpm::parallel_* -@l and $urpm->{fatal}(2, N("Removal failed") . ":\n" . join("\n", map { "\t$_" } @l)); +if (@errors) { + #- Warning : the following message is parsed in urpm::parallel_* + $urpm->{fatal}(2, N("Removal failed") . ":\n" . join("\n", map { "\t$_" } @errors)); +} |