summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2016-05-06 10:04:53 +0000
committerNorbert Preining <preining@logic.at>2016-05-06 10:04:53 +0000
commitba3fde6dda599a92cd2a5956e7a83adbb5ecf8ea (patch)
treecf7e2691d568100ad153ded62a6d021bfc074d7a /Master/texmf-dist/scripts
parentd9b3ee3d2e79bf68027bb8afee2418e23ec4aa0a (diff)
tlmgr: persisten-downloads: simplify option handling
git-svn-id: svn://tug.org/texlive/trunk@40915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl44
1 files changed, 12 insertions, 32 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl
index 3f2f3e394df..0487fc95b1a 100755
--- a/Master/texmf-dist/scripts/texlive/tlmgr.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl
@@ -599,31 +599,14 @@ for the full story.\n";
$::no_execute_actions = 1 if (defined($opts{'no-execute-actions'}));
# if we are asked to use persistent connections try to start it here
- {
- my $do_persistent;
- if (defined($opts{'persistent-downloads'})) {
- # a command line argument for persistent-downloads has been given,
- # either with --no-... or --... that overrides any other setting
- $do_persistent = $opts{'persistent-downloads'};
- } else {
- # check if it is set in the config file
- if (defined($config{'persistent-downloads'})) {
- $do_persistent = $config{'persistent-downloads'};
- }
- }
- # default method is doing persistent downloads:
- if (!defined($do_persistent)) {
- $do_persistent = 1;
- }
- ddebug("tlmgr:main: do persistent downloads = $do_persistent\n");
- if ($do_persistent) {
- TeXLive::TLUtils::setup_persistent_downloads() ;
- }
- if (!defined($::tldownload_server)) {
- debug("tlmgr:main: ::tldownload_server not defined\n");
- } else {
- debug("tlmgr:main: ::tldownload_server defined\n");
- }
+ debug("tlmgr:main: do persistent downloads = $opts{'persistent-downloads'}\n");
+ if ($opts{'persistent-downloads'}) {
+ TeXLive::TLUtils::setup_persistent_downloads() ;
+ }
+ if (!defined($::tldownload_server)) {
+ debug("tlmgr:main: ::tldownload_server not defined\n");
+ } else {
+ debug("tlmgr:main: ::tldownload_server defined\n");
}
my $ret = execute_action($action, @ARGV);
@@ -6213,16 +6196,10 @@ sub finish {
sub load_config_file {
#
# first set default values
- # the default for gui-expertmode is 1 since that is what we
- # have shipped till now
$config{"gui-expertmode"} = 1;
- #
- # by default we remove packages
$config{"auto-remove"} = 1;
- #
- # by default we do not require verification
$config{"require-verification"} = 0;
- #
+ $config{"persistent-downloads"} = 1;
# do NOT set this here, we distinguish between explicitly set in the config file
# or implicitly true
# $config{"verify-downloads"} = 1;
@@ -6243,6 +6220,9 @@ sub load_config_file {
if (!defined($opts{"require-verification"})) {
$opts{"require-verification"} = $config{"require-verification"};
}
+ if (!defined($opts{"persistent-downloads"})) {
+ $opts{"persistent-downloads"} = $config{"persistent-downloads"};
+ }
# switched names for this one after initial release.
if ($tlmgr_config_file->key_present("gui_expertmode")) {