diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-08-21 09:37:22 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-08-21 09:37:22 +0000 |
commit | 0a5d697ea52c5a8430c150feaf11de871077e376 (patch) | |
tree | 36360d433ea93e37a124a17224768bc1615ccf29 /urpmi.update | |
parent | 323638bab20b8fd0f8e18bb879b4792a2dcbaf9d (diff) | |
download | urpmi-0a5d697ea52c5a8430c150feaf11de871077e376.tar urpmi-0a5d697ea52c5a8430c150feaf11de871077e376.tar.gz urpmi-0a5d697ea52c5a8430c150feaf11de871077e376.tar.bz2 urpmi-0a5d697ea52c5a8430c150feaf11de871077e376.tar.xz urpmi-0a5d697ea52c5a8430c150feaf11de871077e376.zip |
cleanup
Diffstat (limited to 'urpmi.update')
-rwxr-xr-x | urpmi.update | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/urpmi.update b/urpmi.update index 5ae0c31c..679a4293 100755 --- a/urpmi.update +++ b/urpmi.update @@ -77,11 +77,13 @@ if ($options{all} && !defined $options{ignore}) { @chosen_media = @{$urpm->{media}} or die N("nothing to update (use urpmi.addmedia to add a media)\n"); } else { - if ($options{all}) { @cmdline = '' } #- select all - urpm::media::select_media($urpm, @cmdline); - foreach (@{$urpm->{media}}) { - $options{update} && $_->{update} and $_->{modified} = 1; + if ($options{all}) { + $_->{modified} = 1 foreach @{$urpm->{media}}; + } elsif ($options{update}) { + $_->{modified} = 1 foreach grep { $_->{update} } @{$urpm->{media}}; } + urpm::media::select_media($urpm, @cmdline); + @chosen_media = grep { $_->{modified} } @{$urpm->{media}} or die N("the entry to update is missing\n(one of %s)\n", join(", ", map { $_->{name} } @{$urpm->{media}})); |