aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/pkg.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-09-11 17:26:40 +0000
committerThierry Vignaud <tv@mandriva.org>2007-09-11 17:26:40 +0000
commit728b7d6058e91c67883ea4c53cf7fafc2f7ab2af (patch)
tree99d8a946638345115e76aeb8e58760281f2fd19e /Rpmdrake/pkg.pm
parent13da6ea62a67bd541bb4515af24bcc4ad692dcf7 (diff)
downloadrpmdrake-728b7d6058e91c67883ea4c53cf7fafc2f7ab2af.tar
rpmdrake-728b7d6058e91c67883ea4c53cf7fafc2f7ab2af.tar.gz
rpmdrake-728b7d6058e91c67883ea4c53cf7fafc2f7ab2af.tar.bz2
rpmdrake-728b7d6058e91c67883ea4c53cf7fafc2f7ab2af.tar.xz
rpmdrake-728b7d6058e91c67883ea4c53cf7fafc2f7ab2af.zip
(get_pkgs,warn_about_media) reread the db if we added a new repository
Diffstat (limited to 'Rpmdrake/pkg.pm')
-rw-r--r--Rpmdrake/pkg.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index a4e7b96a..98f655c6 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -211,6 +211,7 @@ Then, restart %s.", $rpmdrake::myname_update)), myexit(-1);
$update_name, make_url_mirror($m), 'media_info/synthesis.hdlist.cz', update => 1,
);
@update_medias = { name => $update_name }; #- hack to simulate a medium for parsing of descriptions
+ return 1;
}
}
@@ -230,9 +231,16 @@ sub get_pkgs {
my $urpm = open_urpmi_db();
my $_lock = urpm::lock::urpmi_db($urpm);
+
+ # build media list for warn_about_media():
@update_medias = get_update_medias($urpm);
- warn_about_media($w, $opts);
+ if (warn_about_media($w, $opts)) {
+ # reread db since it has been reconfigured:
+ $urpm = open_urpmi_db();
+ # update media list in case warn_about_media() added some:
+ @update_medias = get_update_medias($urpm);
+ }
Rpmdrake::gurpm::label(N("Reading updates description"));
Rpmdrake::gurpm::progress(0.05);