aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-01 13:28:15 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-01 13:28:15 +0000
commit0ed586338bb7d7565d79fbed611235d166c80595 (patch)
tree20b1b4e6f7a86d80f12257bfa86d9c4c9a1e9110 /Rpmdrake
parent5b0e630b664d24b45dd1e35c645315b91d7bdfef (diff)
downloadrpmdrake-0ed586338bb7d7565d79fbed611235d166c80595.tar
rpmdrake-0ed586338bb7d7565d79fbed611235d166c80595.tar.gz
rpmdrake-0ed586338bb7d7565d79fbed611235d166c80595.tar.bz2
rpmdrake-0ed586338bb7d7565d79fbed611235d166c80595.tar.xz
rpmdrake-0ed586338bb7d7565d79fbed611235d166c80595.zip
(easy_add_callback_with_mirror) copy of easy_add_callback() (needed
for next commits)
Diffstat (limited to 'Rpmdrake')
-rw-r--r--Rpmdrake/edit_urpm_sources.pm25
1 files changed, 25 insertions, 0 deletions
diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm
index be741e38..6b11e639 100644
--- a/Rpmdrake/edit_urpm_sources.pm
+++ b/Rpmdrake/edit_urpm_sources.pm
@@ -123,6 +123,31 @@ of sources."),
) : 1
}
+sub easy_add_callback_with_mirror() {
+ # when called on early init by rpmdrake
+ $urpm ||= fast_open_urpmi_db();
+
+ #- cooker and community don't have update sources
+ my $want_base_distro = _want_base_distro();
+ my $distro = $rpmdrake::mandrake_release;
+ my ($mirror) = choose_mirror($urpm, message =>
+N("This will attempt to install all official sources corresponding to your
+distribution (%s).
+
+I need to contact the Mandriva website to get the mirror list.
+Please check that your network is currently running.
+
+Is it ok to continue?", $distro),
+ transient => $::main_window,
+ ) or return 0;
+ ref $mirror or return;
+ my $wait = wait_msg(N("Please wait, adding media..."));
+ add_distrib_update_media($urpm, $mirror, if_(!$want_base_distro, only_updates => 1));
+ $offered_to_add_sources->[0] = 1;
+ remove_wait_msg($wait);
+ return 1;
+}
+
sub easy_add_callback() {
# when called on early init by rpmdrake
$urpm ||= fast_open_urpmi_db();