summaryrefslogtreecommitdiff
path: root/Master/install-tl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-xMaster/install-tl37
1 files changed, 36 insertions, 1 deletions
diff --git a/Master/install-tl b/Master/install-tl
index d21bc841204..bd24f67ac5b 100755
--- a/Master/install-tl
+++ b/Master/install-tl
@@ -1227,7 +1227,42 @@ sub load_tlpdb {
info("Loading $master/$TeXLive::TLConfig::InfraLocation/$TeXLive::TLConfig::DatabaseName\n");
$tlpdb=TeXLive::TLPDB->new(root => "$master");
if (!defined($tlpdb)) {
- die "$0: Could not load TeX Live Database from $master, goodbye.\n";
+ my $do_die = 1;
+ # if that failed, and:
+ # - we are installing from the network
+ # - the location string does not contain "tlnet"
+ # then we simply add "/systems/texlive/tlnet" in case someone just
+ # gave an arbitrary CTAN mirror address without the full path
+ if ($media eq "NET" && $location !~ m/tlnet/) {
+ tlwarn("First attempt for net installation failed.\n");
+ tlwarn("Location string does not contain \"tlnet\",\n");
+ tlwarn("so we retry adding \"/systems/texlive/tlnet\".\n");
+ $location .= "/systems/texlive/tlnet";
+ $master = $location;
+ #
+ # since we change location, we reset the error count of the
+ # download object
+ $::tldownload_server->enable if (defined($::tldownload_server));
+ #
+ $tlpdb=TeXLive::TLPDB->new(root => "$master");
+ if (!defined($tlpdb)) {
+ tlwarn("Also that one did not help.\n");
+ tlwarn(<<END_EXPLICIT_MIRROR);
+
+You may want to try specifying an explicit or different CTAN mirror;
+see the information and examples for the -repository option at
+http://tug.org/texlive/doc/install-tl.html
+(or in the output of install-tl --help).
+
+END_EXPLICIT_MIRROR
+ } else {
+ # hurray, that worked out
+ info("Loading $master/$TeXLive::TLConfig::InfraLocation/$TeXLive::TLConfig::DatabaseName\n");
+ $do_die = 0;
+ }
+ }
+ die "$0: Could not load TeX Live Database from $master, goodbye.\n"
+ if $do_die;
}
# set the defaults to what is specified in the tlpdb
$vars{'option_doc'} = $tlpdb->option("install_docfiles");