summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2022-11-20 09:46:47 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2022-11-20 15:42:37 +0000
commit60efa081bd8d464c9e7100dceeeca18e1b57d817 (patch)
tree34158852b03e63d96f1d96afa73d951e226f5a92 /perl-install/install
parent157fe5bf31626e49ece9613faf100fdc924318f8 (diff)
downloaddrakx-60efa081bd8d464c9e7100dceeeca18e1b57d817.tar
drakx-60efa081bd8d464c9e7100dceeeca18e1b57d817.tar.gz
drakx-60efa081bd8d464c9e7100dceeeca18e1b57d817.tar.bz2
drakx-60efa081bd8d464c9e7100dceeeca18e1b57d817.tar.xz
drakx-60efa081bd8d464c9e7100dceeeca18e1b57d817.zip
installer: allow user to specify mirror and downloader when installing updates.
Diffstat (limited to 'perl-install/install')
-rw-r--r--perl-install/install/steps_interactive.pm20
1 files changed, 19 insertions, 1 deletions
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");