summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2022-11-26 22:51:26 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2022-11-28 18:05:29 +0000
commitdd94cd15d608a684a31f6b382809e001aacbf9bd (patch)
treeb016790f695255d3d1c5e7b986b3810a9958ed99 /perl-install
parent26934d4f834d28c5a29eaf0f3132ebfd6c3e7b72 (diff)
downloaddrakx-dd94cd15d608a684a31f6b382809e001aacbf9bd.tar
drakx-dd94cd15d608a684a31f6b382809e001aacbf9bd.tar.gz
drakx-dd94cd15d608a684a31f6b382809e001aacbf9bd.tar.bz2
drakx-dd94cd15d608a684a31f6b382809e001aacbf9bd.tar.xz
drakx-dd94cd15d608a684a31f6b382809e001aacbf9bd.zip
Only allow available downloaders to be chosen when not in installer.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/any.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index d09bc323b..e49c9ddff 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -1959,6 +1959,10 @@ sub ask_mirror_and_downloader {
my $mirror_choice = $mirror_url eq '$MIRRORLIST' ? 'automatic' : 'specific';
+ my $enable_aria2 = $::isInstall || $in->do_pkgs->is_installed('aria2', '/usr/bin/aria2c');
+ my $enable_curl = $::isInstall || $in->do_pkgs->is_installed('curl', '/usr/bin/curl');
+ my $enable_wget = $::isInstall || $in->do_pkgs->is_installed('wget', '/usr/bin/wget');
+
$in->ask_from_(
{
},
@@ -1981,9 +1985,9 @@ sub ask_mirror_and_downloader {
my ($choice) = @_;
+{
'default' => N("Default"),
- 'aria2' => 'aria2',
- 'curl' => 'curl',
- 'wget' => 'wget',
+ if_($enable_aria2, 'aria2' => 'aria2'),
+ if_($enable_curl, 'curl' => 'curl'),
+ if_($enable_wget, 'wget' => 'wget'),
}->{$choice};
},
},