Mageia Bugzilla – Attachment 349 Details for
Bug 1024
media.cfg is bogus regarding update media (thus exposing *urpmi --auto-s --update defaulting to all media when there're no update media, including cdrom in chroot)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
fix defaulting to select all media when using --update and there's no update media
urpmi-1024.diff (text/plain), 1.43 KB, created by
Thierry Vignaud
on 2011-05-04 18:02:46 CEST
(
hide
)
Description:
fix defaulting to select all media when using --update and there's no update media
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2011-05-04 18:02:46 CEST
Size:
1.43 KB
patch
obsolete
>diff -p -up ./urpm/media.pm.tv ./urpm/media.pm >--- ./urpm/media.pm.tv 2011-05-04 15:56:19.524541154 +0000 >+++ ./urpm/media.pm 2011-05-04 15:57:52.500660138 +0000 >@@ -668,7 +668,7 @@ sub configure { > } > _auto_update_media($urpm, %options); > >- _pick_mirror_if_needed($urpm, $_, '') foreach non_ignored_media($urpm); >+ _pick_mirror_if_needed($urpm, $_, '') foreach non_ignored_media($urpm, $options{update}); > > parse_media($urpm, \%options) if !$options{nodepslist}; > use Data::Dumper; >@@ -689,7 +689,7 @@ sub _auto_update_media { > $options{callback} = delete $options{download_callback}; > > foreach (grep { _is_remote_virtual($_) || $urpm->{options}{'auto-update'} } >- non_ignored_media($urpm)) { >+ non_ignored_media($urpm, $options{update})) { > _update_medium($urpm, $_, %options); > } > } >@@ -712,7 +712,7 @@ sub all_media_to_update { > sub parse_media { > my ($urpm, $options) = @_; > >- foreach (non_ignored_media($urpm)) { >+ foreach (non_ignored_media($urpm, $options->{update})) { > delete @$_{qw(start end)}; > _parse_synthesis_or_ignore($urpm, $_, $options->{callback}); > >@@ -1873,7 +1873,7 @@ sub update_media { > $_->{modified} ||= 1 foreach all_media_to_update($urpm); > } > >- update_those_media($urpm, [ grep { $_->{modified} } non_ignored_media($urpm) ], %options); >+ update_those_media($urpm, [ grep { $_->{modified} } non_ignored_media($urpm, $options{update}) ], %options); > } > > sub update_those_media {
diff -p -up ./urpm/media.pm.tv ./urpm/media.pm --- ./urpm/media.pm.tv 2011-05-04 15:56:19.524541154 +0000 +++ ./urpm/media.pm 2011-05-04 15:57:52.500660138 +0000 @@ -668,7 +668,7 @@ sub configure { } _auto_update_media($urpm, %options); - _pick_mirror_if_needed($urpm, $_, '') foreach non_ignored_media($urpm); + _pick_mirror_if_needed($urpm, $_, '') foreach non_ignored_media($urpm, $options{update}); parse_media($urpm, \%options) if !$options{nodepslist}; use Data::Dumper; @@ -689,7 +689,7 @@ sub _auto_update_media { $options{callback} = delete $options{download_callback}; foreach (grep { _is_remote_virtual($_) || $urpm->{options}{'auto-update'} } - non_ignored_media($urpm)) { + non_ignored_media($urpm, $options{update})) { _update_medium($urpm, $_, %options); } } @@ -712,7 +712,7 @@ sub all_media_to_update { sub parse_media { my ($urpm, $options) = @_; - foreach (non_ignored_media($urpm)) { + foreach (non_ignored_media($urpm, $options->{update})) { delete @$_{qw(start end)}; _parse_synthesis_or_ignore($urpm, $_, $options->{callback}); @@ -1873,7 +1873,7 @@ sub update_media { $_->{modified} ||= 1 foreach all_media_to_update($urpm); } - update_those_media($urpm, [ grep { $_->{modified} } non_ignored_media($urpm) ], %options); + update_those_media($urpm, [ grep { $_->{modified} } non_ignored_media($urpm, $options{update}) ], %options); } sub update_those_media {
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1024
:
310
|
313
|
315
|
316
|
317
| 349