summaryrefslogtreecommitdiff
path: root/systems/texlive/tlnet/tlpkg/TeXLive
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-05-18 03:01:12 +0000
committerNorbert Preining <norbert@preining.info>2021-05-18 03:01:12 +0000
commit97eca13a92a0b8ad423b606c8970c9ce64d9b2bf (patch)
tree7275ec8351efb8f8108d65ec87d4cc81512a295a /systems/texlive/tlnet/tlpkg/TeXLive
parentd999da47ff375df843c0c9bbfd5911236dd9d40a (diff)
CTAN sync 202105180301
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/TeXLive')
-rw-r--r--systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm36
1 files changed, 33 insertions, 3 deletions
diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm
index 15e7f8366c..98e17b7ecc 100644
--- a/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm
+++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm
@@ -1,4 +1,4 @@
-# $Id: TLUtils.pm 59234 2021-05-16 22:43:42Z karl $
+# $Id: TLUtils.pm 59237 2021-05-17 00:41:40Z preining $
# TeXLive::TLUtils.pm - the inevitable utilities for TeX Live.
# Copyright 2007-2021 Norbert Preining, Reinhard Kotucha
# This file is licensed under the GNU General Public License version 2
@@ -6,7 +6,7 @@
package TeXLive::TLUtils;
-my $svnrev = '$Revision: 59234 $';
+my $svnrev = '$Revision: 59237 $';
my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
sub module_revision { return $_modulerevision; }
@@ -2585,6 +2585,21 @@ sub setup_programs {
setup_one(($isWin ? "w32" : "unix"), $defprog,
"$bindir/$dltype/$defprog.$platform", "--version", $tlfirst);
}
+ # check for wget/ssl support
+ if (member("wget", @working_downloaders)) {
+ debug("TLUtils::setup_programs: checking for ssl enabled wget\n");
+ my @lines = `$::progs{'wget'} --version 2>&1`;
+ if (grep(/\+ssl/, @lines)) {
+ $::progs{'options'}{'wget-ssl'} = 1;
+ my @wgetargs = @{$TeXLive::TLConfig::FallbackDownloaderArgs{'wget'}};
+ push @wgetargs, '--no-check-certificate';
+ $TeXLive::TLConfig::FallbackDownloaderArgs{'wget'} = \@wgetargs;
+ debug("TLUtils::setup_programs: wget has ssl, final wget args: @{$TeXLive::TLConfig::FallbackDownloaderArgs{'wget'}}\n");
+ } else {
+ debug("TLUtils::setup_programs: wget without ssl support found\n");
+ $::progs{'options'}{'wget-ssl'} = 0;
+ }
+ }
$::progs{'working_downloaders'} = [ @working_downloaders ];
my @working_compressors;
for my $defprog (sort
@@ -3985,7 +4000,22 @@ sub query_ctan_mirror {
if (TeXLive::TLUtils::member("curl", @working_downloaders)) {
return query_ctan_mirror_curl();
} elsif (TeXLive::TLUtils::member("wget", @working_downloaders)) {
- return query_ctan_mirror_wget();
+ if ($::progs{'options'}{'wget-ssl'}) {
+ # we need ssl enabled wget to query ctan
+ return query_ctan_mirror_wget();
+ } else {
+ tlwarn(<<END_NO_SSL);
+TLUtils::query_ctan_mirror: neither curl nor an ssl-enabled wget is
+ available, so no CTAN mirror can be resolved via https://mirror.ctan.org.
+
+ Please install curl or ssl-enabled wget; otherwise, please pick an
+ http (not https) mirror from the list at https://ctan.org/mirrors/mirmon.
+
+ To report a bug about this, please rerun your command with -vv and
+ include the resulting output with the report.
+END_NO_SSL
+ return;
+ }
} else {
return;
}