diff options
Diffstat (limited to 'Rpmdrake/pkg.pm')
-rw-r--r-- | Rpmdrake/pkg.pm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index 5f753115..a1ac8940 100644 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -166,8 +166,14 @@ sub warn_about_media { return if $::rpmdrake_options{'no-media-update'}; # we use our own instance of the urpmi db in order not to mess up with skip-list managment (#31092): + # and no need to fully configure urpmi since we may have to do it again anyway because of new media: my $urpm = fast_open_urpmi_db(); + my $_lock = urpm::lock::urpmi_db($urpm); + + # build media list: + @update_medias = get_update_medias($urpm); + # do not update again media after installing/removing some packages: $::rpmdrake_options{'no-media-update'} ||= 1; @@ -227,16 +233,12 @@ sub get_pkgs { my $_gurpm_clean_guard = before_leaving { Rpmdrake::gurpm::end() }; my $_flush_guard = Gtk2::GUI_Update_Guard->new; - # no need to fully configure urpmi since we may have to do it again anyway because of warn_about_media(): - my $urpm = fast_open_urpmi_db(); - my $_lock = urpm::lock::urpmi_db($urpm); + warn_about_media($w, $opts); - # build media list for warn_about_media(): - @update_medias = get_update_medias($urpm); + my $urpm = open_urpmi_db(); - warn_about_media($w, $opts); + my $_lock = urpm::lock::urpmi_db($urpm); - $urpm = open_urpmi_db(); # update media list in case warn_about_media() added some: @update_medias = get_update_medias($urpm); |