From 1f26e3f229e8f11e77502b1f68feeca398b98b1f Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 6 Jun 2022 09:21:41 +0900 Subject: install-tl: various fixes - --scheme command line option overrides scheme setting in profile - exit on --no-installation before doing anything real - --debug-setup-vars does not exit now, use --no-installation --- Master/install-tl | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Master/install-tl b/Master/install-tl index 3c55fa9949d..8c8d955355c 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -731,11 +731,16 @@ $vars{'tlpdbopt_desktop_integration'} = 0 if $vars{'instopt_portable'}; install_warnlines_hook(); # collect warnings in @::WARNLINES info("Installing to: $vars{TEXDIR}\n"); +if (!$opt_installation) { + print STDERR "Not doing installation due to --no-installation, terminating here.\n"; + exit 0; +} + $::env_warns = ""; create_welcome(); my $status = 1; if ($opt_gui eq 'text' or $opt_gui eq 'extl' or $opt_profile ne "") { - $status = $opt_installation && do_installation(); + $status = do_installation(); if (@::WARNLINES) { foreach my $t (@::WARNLINES) { print STDERR $t; } } @@ -933,6 +938,10 @@ sub final_remote_init { # size information $vars{'free_size'} = TeXLive::TLUtils::diskfree($vars{'TEXDIR'}); + update_selected_scheme_from_cmdline(); +} # final_remote_init + +sub update_selected_scheme_from_cmdline { # initialize the scheme from the command line value, if given. if ($opt_scheme) { # add the scheme- prefix if they didn't give it. @@ -944,8 +953,7 @@ sub final_remote_init { tlwarn("Scheme $opt_scheme not defined, ignoring it.\n"); } } -} # final_remote_init - +} sub do_installation { if (win32()) { @@ -1766,7 +1774,7 @@ sub set_texlive_default_dirs { TEXMFCONFIG TEXMFLOCAL/) { print "$i = $vars{$i}\n"; } - exit(1); + # exit(1); } } # set_texlive_default_dirs @@ -2246,6 +2254,9 @@ sub read_profile { } } } + # Cmdline argument --scheme should override scheme selection in the profile + update_selected_scheme_from_cmdline(); + # if at least one collection has been defined return here return if $coldefined; # since no collections have been defined in the profile, we -- cgit v1.2.3