summaryrefslogtreecommitdiff
path: root/Master/texmf/scripts
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2010-05-25 07:56:32 +0000
committerNorbert Preining <preining@logic.at>2010-05-25 07:56:32 +0000
commitc7e460b65829bcffdd2d3fb216735843753a1c61 (patch)
tree6f5280835f3fee4dda8ac0d446ef037358b3846b /Master/texmf/scripts
parentf71682b1662ada1b4fcdaa74dfbeea91d7c74bc8 (diff)
remove the -allow-ftp and implement automatic fallback to http
operation: 1. get a mirror (this retries 3 times to contact mirror.ctan.org) - if no mirror has been given, use one of the backbone servers - if it is an http server return it (no test!) - if it is a ftp server, continue below 2. if the ftp mirror is good, return it 3. if the ftp mirror is bad, search for http mirror (5 times) 4. if http mirror is found, return it (no test!) 5. if no http mirror is found return one of the backbone servers THe above als changes the way mirror.ctan.org is contacted. If it fails at first time it automatically retries 3 times to get a mirror. git-svn-id: svn://tug.org/texlive/trunk@18467 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/scripts')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl50
1 files changed, 6 insertions, 44 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 1615cd38038..4ffb20675bc 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -95,7 +95,6 @@ our $tlmediatlpdb;
our $location; # location from which the new packages come
our $localtlmedia; # local installation which we are munging
our $localtlpdb; # local installation which we are munging
-our @allow_ftp_args;
# flags for machine-readable form
our $FLAG_REMOVE = "d";
@@ -127,7 +126,6 @@ sub main {
"machine-readable" => 1,
"package-logfile" => "=s",
"persistent-downloads" => "!",
- "allow-ftp" => "!",
"pause" => 1,
"version" => 1,
"help|h|?" => 1);
@@ -355,26 +353,6 @@ sub main {
if $do_persistent;
}
- #
- # check for allowing ftp connections in the tlmgr config file and
- # command line
- {
- my $do_ftp;
- if (defined($opts{'allow-ftp'})) {
- $do_ftp = ($opts{'allow-ftp'} ? 1 : 0);
- } else {
- if (defined($config{'allow-ftp'})) {
- $do_ftp = $config{'allow-ftp'};
- }
- }
- # default is not to allow ftp mirrors
- if (!defined($do_ftp)) {
- $do_ftp = 0;
- }
- debug("are ftp mirrors are allowed: $do_ftp\n");
- push @allow_ftp_args, '-allow-ftp', $do_ftp;
- }
-
execute_action($action, @ARGV);
# end of main program.
@@ -462,7 +440,7 @@ sub execute_action {
}
finish(0);
} elsif ($action =~ m/^get-mirror$/i) {
- my $loc = give_ctan_mirror(@allow_ftp_args);
+ my $loc = give_ctan_mirror();
print "$loc\n";
finish(0);
} elsif ($action =~ m/^generate$/i) {
@@ -4196,9 +4174,9 @@ sub init_tlmedia
# choose a mirror if we are asked.
if ($location =~ m/^ctan$/i) {
- $location = give_ctan_mirror(@allow_ftp_args);
+ $location = give_ctan_mirror();
} elsif ($location =~ m,^$TeXLiveServerURL,) {
- my $mirrorbase = TeXLive::TLUtils::give_ctan_mirror_base(@allow_ftp_args);
+ my $mirrorbase = TeXLive::TLUtils::give_ctan_mirror_base();
$location =~ s,^$TeXLiveServerURL,$mirrorbase,;
}
@@ -4416,12 +4394,6 @@ sub load_config_file
} else {
tlwarn("Unknown value $val for persistent-downloads in $fn\n");
}
- } elsif ($key eq "allow-ftp") {
- if (($val eq "0") || ($val eq "1")) {
- $config{'allow-ftp'} = $val;
- } else {
- tlwarn("Unknown value $val for allow-ftp in $fn\n");
- }
} else {
tlwarn("Unknown key $key in $fn\n");
}
@@ -4736,16 +4708,6 @@ fall back to using wget if this is not possible. If you want to disable
usage of LWP and persistent connections, please use
B<--no-persistent-downloads>.
-=item B<-allow-ftp>
-
-By default if mirror.ctan.org is contacted only http mirrors are accepted.
-Adding this command line switch allows ftp mirrors of the CTAN nodes.
-
-If you set a ftp mirror explicitely, that one is in any case used.
-
-You can permanently turn this option on in the tlmgr config file, see
-L<CONFIGURATION FILE> below for details.
-
=item B<--debug-translation>
In GUI mode, this switch makes C<tlmgr> report any missing, or more
@@ -5566,9 +5528,9 @@ All other lines must look like
key = value
-where the allowed keys are C<gui_expertmode>, C<persistent-downloads>, and
-C<allow-ftp>. The values can only be 0 or 1 for those settings.
-C<persistent-downloads> and C<allow-ftp> correspond to the respective
+where the allowed keys are C<gui_expertmode> and C<persistent-downloads>.
+The values can only be 0 or 1 for those settings.
+C<persistent-downloads> corresponds to the respective
command line options of C<tlmgr>. C<gui_expertmode> switches between
the full GUI and a simplified with only the important and mostly used
settings.