From 60efa081bd8d464c9e7100dceeeca18e1b57d817 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 20 Nov 2022 09:46:47 +0000 Subject: installer: allow user to specify mirror and downloader when installing updates. --- perl-install/install/steps_interactive.pm | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'perl-install/install') diff --git a/perl-install/install/steps_interactive.pm b/perl-install/install/steps_interactive.pm index a6f21b2d3..1996efac0 100644 --- a/perl-install/install/steps_interactive.pm +++ b/perl-install/install/steps_interactive.pm @@ -753,12 +753,30 @@ Do you want to setup the update media?")), return; }; + my $urpmi_options = { mirror_url => '$MIRRORLIST', downloader => $o->{options}{downloader} }; + try_again: #- bring all interface up for installing updates packages. install::interactive::upNetwork($o); + any::ask_mirror_and_downloader($o, $urpmi_options); + + if (!any::urpmi_set_downloader($o, $o->{packages}, $urpmi_options->{downloader})) { + log::l("installUpdates: failed to change urpmi downloader"); + if ($o->ask_okcancel(N("Warning"), + N("That downloader could not be installed") . "\n" . N("Retry?"))) { + goto try_again; + } else { + return 0; + } + } + + if ($urpmi_options->{mirror_url} ne '$MIRRORLIST') { + $urpmi_options->{mirror_url} = any::ask_mirror($o, 'distrib', $urpmi_options->{mirror_url}); + } + install::pkgs::clean_rpmdb_shared_regions(); - if (any::urpmi_add_all_media($o, $o->{previous_release})) { + if (any::urpmi_add_all_media($o, $o->{previous_release}, $urpmi_options->{mirror_url})) { log::l("installUpdates: successfully added media"); } else { log::l("installUpdates: failed to add media"); -- cgit v1.2.1