diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-08-21 09:41:46 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-08-21 09:41:46 +0000 |
commit | ee5608142f9444f8db8152f259b0178f2e9dcb07 (patch) | |
tree | b021a2839be13055aaf25be577032f41999d2898 /urpmi.update | |
parent | 0a5d697ea52c5a8430c150feaf11de871077e376 (diff) | |
download | urpmi-ee5608142f9444f8db8152f259b0178f2e9dcb07.tar urpmi-ee5608142f9444f8db8152f259b0178f2e9dcb07.tar.gz urpmi-ee5608142f9444f8db8152f259b0178f2e9dcb07.tar.bz2 urpmi-ee5608142f9444f8db8152f259b0178f2e9dcb07.tar.xz urpmi-ee5608142f9444f8db8152f259b0178f2e9dcb07.zip |
cleanup
Diffstat (limited to 'urpmi.update')
-rwxr-xr-x | urpmi.update | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/urpmi.update b/urpmi.update index 679a4293..b27f7fba 100755 --- a/urpmi.update +++ b/urpmi.update @@ -78,16 +78,17 @@ if ($options{all} && !defined $options{ignore}) { or die N("nothing to update (use urpmi.addmedia to add a media)\n"); } else { if ($options{all}) { - $_->{modified} = 1 foreach @{$urpm->{media}}; + @chosen_media = @{$urpm->{media}}; } elsif ($options{update}) { - $_->{modified} = 1 foreach grep { $_->{update} } @{$urpm->{media}}; + @chosen_media = 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}})); + push @chosen_media, urpm::media::select_media_by_name($urpm, \@cmdline); + @chosen_media or die N("the entry to update is missing\n(one of %s)\n", join(", ", map { $_->{name} } @{$urpm->{media}})); + foreach (@chosen_media) { + $_->{modified} = 1; + if ($options{ignore}) { $_->{ignore} = 1; } else { |