diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | Rpmdrake/edit_urpm_sources.pm | 10 |
2 files changed, 11 insertions, 1 deletions
@@ -1,4 +1,6 @@ - edit-urpm-sources: + o fix enabling for the first time a medium that never was enabled + before (#52636) o ignore rpmdrake's option regarding ignoring debug media o prevent crashing if one click on a media checkbox while another one is being processed (gtk+ was reentering the callback when we diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm index 8e6a3973..3c602189 100644 --- a/Rpmdrake/edit_urpm_sources.pm +++ b/Rpmdrake/edit_urpm_sources.pm @@ -1068,6 +1068,12 @@ sub mainwindow() { my $ignored = $urpm->{media}[$path]{ignore}; $reread_media->(); if (!$ignored && $urpm->{media}[$path]{ignore}) { + # reread media failed to un-ignore an ignored medium + # probably because urpm::media::check_existing_medium() complains + # about missing synthesis when the medium never was enabled before; + # thus it restored the ignore bit + $urpm->{media}[$path]{ignore} = !$urpm->{media}[$path]{ignore} || undef; + urpm::media::write_config($urpm); #- Enabling this media failed, force update interactive_msg('rpmdrake', N("This medium needs to be updated to be usable. Update it now ?"), @@ -1091,7 +1097,6 @@ sub mainwindow() { my ($name) = @_; $reorder_ok = 0; $something_changed = 1; - $urpm = fast_open_urpmi_db(); if (defined $name) { urpm::media::select_media($urpm, $name); update_sources_check( @@ -1101,6 +1106,9 @@ sub mainwindow() { $name, ); } + # reread configuration after updating media else ignore bit will be restored + # by urpm::media::check_existing_medium(): + $urpm = fast_open_urpmi_db(); $list->clear; foreach (grep { ! $_->{external} } @{$urpm->{media}}) { my $name = $_->{name}; |