summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2022-11-20 09:40:11 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2022-11-20 09:40:11 +0000
commit7c7df97790003ac5b47658a5ac94054fbd24e7e1 (patch)
tree2b9d8cf4806202d9ebcb85356fdf6f1395b5a01c /perl-install/any.pm
parent88419fd468b76cea82776ef590aa4e600bacdfeb (diff)
downloaddrakx-7c7df97790003ac5b47658a5ac94054fbd24e7e1.tar
drakx-7c7df97790003ac5b47658a5ac94054fbd24e7e1.tar.gz
drakx-7c7df97790003ac5b47658a5ac94054fbd24e7e1.tar.bz2
drakx-7c7df97790003ac5b47658a5ac94054fbd24e7e1.tar.xz
drakx-7c7df97790003ac5b47658a5ac94054fbd24e7e1.zip
Add option to specify mirror URL to any::urpmi_add_all_media.
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 698593f44..933976302 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -1156,7 +1156,9 @@ sub sessions_with_order() {
}
sub urpmi_add_all_media {
- my ($in, $o_previous_release) = @_;
+ my ($in, $o_previous_release, $o_mirror_url) = @_;
+
+ $o_mirror_url = undef if $o_mirror_url eq '$MIRRORLIST';
my $binary = find { whereis_binary($_, $::prefix) } if_(check_for_xserver(), 'gurpmi.addmedia'), 'urpmi.addmedia';
if (!$binary) {
@@ -1174,7 +1176,7 @@ sub urpmi_add_all_media {
run_program::rooted($::prefix, 'urpmi.removemedia', '-a');
# Then add online media:
my $wait;
- my @options = ('--distrib', '--mirrorlist', '$MIRRORLIST');
+ my @options = $o_mirror_url ? ( '--distrib', $o_mirror_url) : ('--distrib', '--mirrorlist', '$MIRRORLIST');
if ($binary eq 'urpmi.addmedia') {
$wait = $in->wait_message(N("Please wait"), N("Please wait, adding media..."));
} elsif ($in->isa('interactive::gtk')) {