diff options
author | Thierry Vignaud <tv@mandriva.org> | 2009-10-09 16:08:56 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2009-10-09 16:08:56 +0000 |
commit | a42fc2873be9b3ceb4ff0c52289036859b9519ae (patch) | |
tree | 2853760fe97923cc553eaa1b9d99d93b6df630e6 /Rpmdrake | |
parent | 355584205c27cf22959b3b29107bfe2a9e3e5dbc (diff) | |
download | rpmdrake-a42fc2873be9b3ceb4ff0c52289036859b9519ae.tar rpmdrake-a42fc2873be9b3ceb4ff0c52289036859b9519ae.tar.gz rpmdrake-a42fc2873be9b3ceb4ff0c52289036859b9519ae.tar.bz2 rpmdrake-a42fc2873be9b3ceb4ff0c52289036859b9519ae.tar.xz rpmdrake-a42fc2873be9b3ceb4ff0c52289036859b9519ae.zip |
fix enabling for the first time a medium that never was enabled before
(#47110, #52636) (side effect of urpmi changes)
(mainwindow:toggled signal) 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
(reread_media) read back configuration after and not before updating
media else ignore bit will be restored by
urpm::media::check_existing_medium() when trying to update a never
enabled yet medium
Diffstat (limited to 'Rpmdrake')
-rw-r--r-- | Rpmdrake/edit_urpm_sources.pm | 10 |
1 files changed, 9 insertions, 1 deletions
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}; |