summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-04-19 16:02:35 +0000
committerKarl Berry <karl@freefriends.org>2013-04-19 16:02:35 +0000
commitcd8bd9150225fd603f3d1a3c70914668b0d01866 (patch)
tree95d44e01d47f726da7f7ade6f160c808f136a813 /Master/tlpkg
parentc79d10db64a072f1ee07e9dc04dc9ebcc191c07c (diff)
msg tweaking in case of wget fallback
git-svn-id: svn://tug.org/texlive/trunk@30038 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r--Master/tlpkg/TeXLive/TLDownload.pm2
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm16
2 files changed, 15 insertions, 3 deletions
diff --git a/Master/tlpkg/TeXLive/TLDownload.pm b/Master/tlpkg/TeXLive/TLDownload.pm
index d1528d89768..0eb24f84357 100644
--- a/Master/tlpkg/TeXLive/TLDownload.pm
+++ b/Master/tlpkg/TeXLive/TLDownload.pm
@@ -28,7 +28,7 @@ my $MAX_ERRORCOUNT = 5;
our $net_lib_avail = 0;
eval { require LWP; };
if ($@) {
- debug("LWP is not available, falling back to wget mode.\n");
+ debug("LWP is not available, falling back to wget.\n");
$net_lib_avail = 0;
} else {
require LWP::UserAgent;
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index a989afb9e6f..825f6daf56a 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -2494,6 +2494,8 @@ sub download_file {
} else {
$url = "$TeXLiveURL/$relpath";
}
+
+ my $wget_retry = 0;
if (defined($::tldownload_server) && $::tldownload_server->enabled) {
debug("persistent connection set up, trying to get $url (for $dest)\n");
$ret = $::tldownload_server->get_file($url, $dest);
@@ -2501,8 +2503,10 @@ sub download_file {
debug("downloading file via persistent connection succeeded\n");
return $ret;
} else {
- tlwarn("tlmgr: persistent connection ok, but download failed: $url\n");
- tlwarn("tlmgr: retrying with wget.\n");
+ tlwarn("TLUtils::download_file: persistent connection ok,"
+ . " but download failed: $url\n");
+ tlwarn("TLUtils::download_file: retrying with wget.\n");
+ $wget_retry = 1; # just so we can give another msg.
}
} else {
if (!defined($::tldownload_server)) {
@@ -2512,7 +2516,15 @@ sub download_file {
}
debug("persistent connection not set up, using wget\n");
}
+
+ # try again.
my $ret = _download_file($url, $dest, $wget);
+
+ if ($wget_retry) {
+ tlwarn("TLUtils::download_file: retry with wget "
+ . ($ret ? "succeeded" : "failed") . ": $url\n");
+ }
+
return($ret);
}