texlive[63643] Master: If --no-interaction, don't ask about importing

commits+karl at tug.org commits+karl at tug.org
Sat Jun 18 23:43:37 CEST 2022


Revision: 63643
          http://tug.org/svn/texlive?view=revision&revision=63643
Author:   karl
Date:     2022-06-18 23:43:37 +0200 (Sat, 18 Jun 2022)
Log Message:
-----------
If --no-interaction, don't ask about importing settings.
(load_tlpdb): If --scheme, use it before $vars{'selected_scheme'}
  when determining $selscheme.
Doc updates.

Modified Paths:
--------------
    trunk/Master/install-tl
    trunk/Master/tlpkg/installer/install-menu-text.pl

Modified: trunk/Master/install-tl
===================================================================
--- trunk/Master/install-tl	2022-06-18 20:06:28 UTC (rev 63642)
+++ trunk/Master/install-tl	2022-06-18 21:43:37 UTC (rev 63643)
@@ -351,11 +351,13 @@
   Win32::SetChildShowWindow(0) if win32();
 }
 
-# if we find a file installation.profile we ask the user whether we should
-# continue with the installation
-# note, we are in the directory from which the aborted installation was run.
+# If we find a file installation.profile we ask the user whether we should
+# continue with the installation, unless there shouldn't be interaction.
+# We are in the directory from which the aborted installation was run.
 my %profiledata;
-if (-r "installation.profile" && !exists $ENV{"TEXLIVE_INSTALL_NO_RESUME"}) {
+if (-r "installation.profile"
+    && $opt_interaction
+    && !exists $ENV{"TEXLIVE_INSTALL_NO_RESUME"}) {
   if ($from_ext_gui) { # prepare for dialog interaction
     print "mess_yesno\n";
   }
@@ -392,8 +394,8 @@
            "lang|gui-lang=s"             => \$::opt_lang,
            "location|url|repository|repos|repo=s" => \$opt_location,
            "no-cls",                    # $::opt_no_cls in install-menu-text-pl
+           "no-doc-install"              => \$opt_no_doc_install,
            "no-gui"                      => \$opt_no_gui,
-           "no-doc-install"              => \$opt_no_doc_install,
            "no-src-install"              => \$opt_no_src_install,
            "non-admin"                   => \$opt_nonadmin,
            "paper=s"                     => \$opt_paper,
@@ -679,7 +681,7 @@
 
   # before we start the installation we check for the existence of
   # a previous installation, and in case we ship inform the UI
-  if (!exists $ENV{"TEXLIVE_INSTALL_NO_RESUME"}) {
+  if (!exists $ENV{"TEXLIVE_INSTALL_NO_RESUME"} && $opt_interaction) {
     my $tlmgrwhich = which("tlmgr");
     if ($tlmgrwhich) {
       my $dn = dirname($tlmgrwhich);
@@ -949,6 +951,11 @@
   if ($opt_scheme) {
     # add the scheme- prefix if they didn't give it.
     $opt_scheme = "scheme-$opt_scheme" if $opt_scheme !~ /^scheme-/;
+    #
+    # add "only" if they said "infra" (Tired of making this typo, should
+    # have named it "infra" in the first place, but too late.)
+    $opt_scheme .= "only" if $opt_scheme eq "scheme-infra";
+    #
     my $scheme = $tlpdb->get_package($opt_scheme);
     if (defined($scheme)) {
       select_scheme($opt_scheme);  # select it
@@ -1823,7 +1830,7 @@
       }
     } else {
       for my $scheme_content ($scheme->depends) {
-        $install{"$scheme_content"}=1 unless ($scheme_content=~/^collection-/);
+        $install{"$scheme_content"}=1 unless $scheme_content =~ /^collection-/;
       }
     }
   }
@@ -1992,14 +1999,21 @@
 
   # select scheme: either $vars{'selected_scheme'} or $default_scheme
   # check that the default scheme is actually present, otherwise switch to
-  # scheme-minimal
-  my $selscheme = defined($vars{'selected_scheme'}) ? $vars{'selected_scheme'}
-                                                    : $default_scheme;
+  # scheme-minimal.
+  my $selscheme;
+  if ($opt_scheme) {
+    $selscheme = $opt_scheme;
+  } elsif ($vars{"selected_scheme"}) {
+    $selscheme = $vars{"selected_scheme"};
+  } else {
+    $selscheme = $default_scheme;
+  }
   if (!defined($tlpdb->get_package($selscheme))) {
     if (!defined($tlpdb->get_package("scheme-minimal"))) {
       die("Aborting, cannot find either $selscheme or scheme-minimal");
     }
     $default_scheme = "scheme-minimal";
+    tlwarn("$0: No $selscheme, switching to $default_scheme.\n");
     $vars{'selected_scheme'} = $default_scheme;
   }
   # make sure that we update %vars for collection_* if only selected_scheme
@@ -2878,11 +2892,10 @@
 =head1 EXAMPLES
 
 With no options, C<install-tl> drops you into an interactive menu where
-essentially all default settings can be changed. 
+essentially all default settings can be changed. With options, you can
+initialize the settings in various ways, or perform the installation
+without interaction. Some examples:
 
-With options, you can initialize the settings in various ways, or
-perform the installation without interaction.
-
 =over 4
 
 =item C<install-tl --paper=letter>
@@ -2916,10 +2929,15 @@
 leading C<-> or C<-->.  An argument value can be separated from its
 option by either a space or C<=>.
 
+The options relating to customization of the installation can also be
+selected in the interactive installation menus (GUI or text).
+
 =over 4
 
 =item B<-gui> [[=]I<module>]
 
+=item B<-no-gui>
+
 If no I<module> is given, starts the Tcl/Tk (see below) GUI installer.
 
 If I<module> is given loads the given installer module. Currently the
@@ -2947,10 +2965,6 @@
 GNU/Linux, or can be easily installed through a distro package manager.
 For Windows, TeX Live provides a Tcl/Tk runtime.
 
-=item B<-no-gui>
-
-Use the text mode installer (default except on Windows and Macs).
-
 =for comment Keep language list in sync with tlmgr.
 
 =item B<-lang> I<llcode>
@@ -2974,9 +2988,9 @@
 
 For installation, the default is to pick a mirror automatically, using
 L<https://mirror.ctan.org/systems/texlive/tlnet>; the chosen mirror is
-used for the entire download. You can use the special argument C<ctan>
-as an abbreviation for this. (See L<https://ctan.org> for more about CTAN
-and its mirrors.)
+then used for the entire download. You can use the special argument
+C<ctan> as an abbreviation for this. (See L<https://ctan.org> for more
+about CTAN and its mirrors.)
 
 After installation is complete, you can use that installation as the
 repository for another installation.  If you chose to install less than
@@ -3001,15 +3015,15 @@
 
 =item B<-custom-bin> I<path>
 
-If you have built your own set of TeX Live binaries (perhaps because
-your platform was not supported by TeX Live out of the box), this option
-allows you to specify the I<path> to a directory where the binaries for
-the current system are present.  The installation will continue as
-usual, but at the end all files from I<path> are copied over to
-C<bin/custom/> under your installation directory and this C<bin/custom/>
-directory is what will be added to the path for the post-install
-actions.  To install multiple custom binary sets, manually rename
-C<custom> before doing each.
+If you have built your own set of TeX Live binaries (e.g., because
+precompiled binaries were not provided by TL for your platform), this
+option allows you to specify the I<path> to a directory where the
+binaries for the current system are present. The installation will
+continue as usual, but at the end all files from I<path> are copied over
+to C<bin/custom/> under your installation directory and this
+C<bin/custom/> directory is what will be added to the path for the
+post-install actions. To install multiple custom binary sets, manually
+rename C<custom> before doing each.
 
 For more information on custom binaries, see
 L<https://tug.org/texlive/custom-bin.html>.  For general information on
@@ -3017,8 +3031,9 @@
 
 =item B<-debug-fakenet>
 
-Pretend we're doing a network install, for the sole purpose of testing
-broken downloads via moving package files aside in a tlnet mirror.
+Pretend we're doing a network install. This is for the sole purpose of
+testing the code to handle broken downloads, via moving package files
+aside in a tlnet mirror hierarchy.
 
 =item B<-debug-setup-vars>
 
@@ -3035,8 +3050,9 @@
 =item B<-force-platform> I<platform>
 
 Instead of auto-detecting the current platform, use I<platform>.
-Binaries for this platform must be present and they must actually be
-runnable, or installation will fail.  C<-force-arch> is a synonym.
+Binaries for this platform must be present in C<bin/>I<platform>C</> and
+they must be runnable, or installation will fail. C<-force-arch> is a
+synonym.
 
 =item B<-help>, B<--help>, B<-?>
 
@@ -3095,9 +3111,23 @@
 
 =item B<-no-src-install>
 
-Do not install source/doc files and set the options to not install source/doc
-files in the saved database.
+Do not install the documentation resp. source package files, both for
+the immediate installation and for future updates. After installation,
+inclusion of the doc/src files can be re-enabled via C<tlmgr>:
 
+  tlmgr option docfiles 1
+  tlmgr option srcfiles 1
+
+If you later find that you want the doc/src files for a package that has
+been installed without them, you can get them like this (using the
+C<fontspec> package as the example):
+
+  tlmgr install --reinstall --with-doc --with-src fontspec
+
+The source files mentioned here are those relating to TeX packages, such
+as C<.dtx> files. The sources that are compiled to make the binaries are
+available separately: see L<https://tug.org/texlive/svn/>.
+
 =item B<-no-installation>
 
 Do not perform any installation. This is for debugging the
@@ -3105,8 +3135,9 @@
 
 =item B<-no-interaction>
 
-Do not enter the interactive menu, just perform the installation after
-initialization and option parsing.
+Do not enter the interactive menu; immediately perform the installation
+after initialization and option parsing. Also omit the check for a
+previous installation and asking about importing previous settings.
 
 =item B<-no-persistent-downloads>
 
@@ -3142,8 +3173,8 @@
 
 =item B<-portable>
 
-Install for portable use, e.g., on a USB stick.  Also selectable from
-within the perltk and text installers.
+Install for portable use, e.g., on a USB stick.  See the
+C<instopt_portable> description below for details.
 
 =item B<-print-platform>
 
@@ -3164,28 +3195,24 @@
 =item B<-scheme> I<scheme>
 
 Schemes are the highest level of package grouping in TeX Live; the
-default is to use the C<full> scheme, which includes everything.  This
-option overrides that default.  You can change the scheme again before
-the actual installation with the usual menu.  The I<scheme> argument may
-optionally have a prefix C<scheme->.  The list of supported scheme names
+default is to use the C<full> scheme, which includes everything. This
+option overrides that default. The I<scheme> argument value may
+optionally have a prefix C<scheme->. The list of supported scheme names
 depends on what your package repository provides; see the interactive
 menu list.
 
-=item B<-v>
-
-Include verbose debugging messages; repeat for maximum debugging: C<-v
--v>.  (Further repeats are accepted but ignored.)
-
 =item B<-texdir> I<dir>
 
 Specify the system installation directory; the default is
 C</usr/local/texlive/YYYY> for release YYYY. Specifying this option also
 causes the C<TEXMFLOCAL>, C<TEXMFSYSCONFIG>, and C<TEXMFSYSVAR>
-directories to be set as subdirectories, so they don't have to be set
-individually.
+directories to be set as subdirectories of I<dir>, so they don't have to
+be set individually.
 
-For more on the several directory trees set up by default, see the main
-TeX Live documentation at L<https://tug.org/texlive/doc>.
+There is a brief summary of these directories trees at L</DIRECTORY
+TREES> below; for details on the trees set up by default, and their
+intended usage, see the main TeX Live documentation at
+L<https://tug.org/texlive/doc>.
 
 =item B<-texuserdir> I<dir>
 
@@ -3192,7 +3219,7 @@
 Specify the user installation directory; the default is
 C<~/.texliveYYYY> (except on Macs, where there is no leading dot).
 Specifying this also causes the C<TEXMFHOME>, C<TEXMFCONFIG>, and
-C<TEXMFVAR> directories to be set as subdirectories.
+C<TEXMFVAR> directories to be set as subdirectories of I<dir>.
 
 =item B<-texmflocal> I<dir>
 
@@ -3200,12 +3227,11 @@
 C</usr/local/texlive/texmf-local>, that is, one level up from the main
 installation. This is so locally-installed packages can be easily used
 across releases, which is usually desirable. Specifying the C<-texdir>
-option changes this, putting C<TEXMFLOCAL> under the main tree, on the
-theory that you want to use some setup different than the default. The
-C<-texmflocal> option can be used to specify an explicit directory for it.
+option changes this, putting C<TEXMFLOCAL> under the main tree. The
+C<-texmflocal> option can be used to specify an explicit directory.
 
 Anything installed here must follow the TeX directory structure (TDS),
-e.g., C<TEXMFHOME/tex/latex/mypkg/mypkg.sty>. See the TDS reference at
+e.g., C<TEXMFHOME/tex/latex/mypkg/mypkg.sty>. TDS reference:
 L<https://tug.org/tds>.
 
 =item B<-texmfhome> I<dir>
@@ -3227,7 +3253,14 @@
 =item B<-texmfvar> I<dir>
 
 Specify the C<TEXMFCONFIG> and C<TEXMFVAR> user directories.
+The defaults are C<~/.texliveYYYY/texmf-{config,var}>, except on Macs,
+where the leading dot is omitted (C<~/texliveYYYY/...>).
 
+=item B<-v>
+
+Include verbose debugging messages; repeat for maximum debugging: C<-v
+-v>.  (Further repeats are accepted but ignored.)
+
 =item B<-version>, B<--version>
 
 Output version information and exit.  If C<-v> is also given, the
@@ -3237,17 +3270,18 @@
 
 =head1 PROFILES
 
-A I<profile> file contains all the values needed to perform an
-installation.  After a normal installation has finished, a profile for
+A I<profile> file normally contains all the values needed to perform an
+installation. After a normal installation has finished, a profile for
 that exact installation is written to the file C<tlpkg/texlive.profile>.
 In addition, from the text menu one can select C<P> to save the current
-setup as a profile at any time.
+setup as a profile at any time. These are small text files; feel free to
+peruse and edit them according to your needs.
 
 Such a profile file can be given as the argument to C<-profile>, for
 example to redo the exact same installation on a different system.
 Alternatively, you can use a custom profile, most easily created by
-starting from a generated one and changing values, or an empty file,
-which will take all the defaults.
+starting from a generated one and changing values. An empty profile
+file will cause the installer to use the defaults.
 
 As mentioned above, the installer only supports selection by scheme and
 collections, not individual packages, so packages cannot be specified in
@@ -3265,9 +3299,9 @@
 If the variable C<selected_scheme> is defined and I<no> collection
 variables at all are defined, then the collections required by the
 specified scheme (which might change over time) are installed, without
-explicitly listing them.  This eases maintenance of profile files.  If
-any collections are specified in a profile, though, then all desired
-collections must be given explicitly.
+explicitly listing them. This eases maintenance of profile files. If any
+collections are specified in a profile, though, then the scheme is
+ignored and all desired collections must be given explicitly.
 
 For example, a line 
 
@@ -3278,8 +3312,8 @@
 default options.  The schemes are described in the C<S> menu in the
 text installer, or equivalent.
 
-Besides C<selected_scheme>, here is the list of variable names supported
-in a profile:
+In addition to C<selected_scheme>, here are the other variable names
+supported in a profile:
 
 B<collection options> (prefix C<collection->)
 
@@ -3293,17 +3327,17 @@
 
 B<path options>
 
-It is best to define all of these, even though they may not be used in
-the installation, so as to avoid unintentionally getting a default value
-that could cause problems later.
+It is best to define all of these, even though they may not be used in a
+given installation, so as to avoid unintentionally getting a default
+value that could cause problems later.
 
   TEXDIR
+  TEXMFLOCAL
+  TEXMFSYSCONFIG
+  TEXMFSYSVAR
   TEXMFCONFIG
   TEXMFVAR
   TEXMFHOME
-  TEXMFLOCAL
-  TEXMFSYSCONFIG
-  TEXMFSYSVAR
 
 B<installer options> (prefix C<instopt_>)
 
@@ -3386,6 +3420,10 @@
 
 =over 4
 
+=item C<NOPERLDOC>
+
+Don't try to run the C<--help> message through C<perldoc>.
+
 =item C<TEXLIVE_DOWNLOADER>
 
 =item C<TL_DOWNLOAD_PROGRAM>
@@ -3452,12 +3490,42 @@
 these environment variables; since specifying both is usually
 accidental, a warning is given if the values are different.
 
-=item C<NOPERLDOC>
+=back
 
-Don't try to run the C<--help> message through C<perldoc>.
+=head1 DIRECTORY TREES
 
-=back
+There are a plethora of ways to specify the plethora of directory trees
+used by TeX Live. By far the simplest, and recommended, approach is not
+to change anything. The defaults suffice for the vast majority of
+installations.
 
+But, for the sake of explanation, here is a table of the trees and the
+command line options that change them. The first group of three are
+system directories, and the second group of three are user directories;
+the two groups are quite analogous.
+
+  +----------------+--------------------------------------+--------------+------------------+
+  |    tree        | default                              | group change | single change    |
+  +----------------+--------------------------------------+--------------+------------------+
+  | TEXMFLOCAL     | /usr/local/texlive/YYYY/texmf-local  | --texdir     | --texmflocal     |
+  | TEXMFSYSVAR    | /usr/local/texlive/YYYY/texmf-var    | --texdir     | --texmfsysvar    |
+  | TEXMFSYSCONFIG | /usr/local/texlive/YYYY/texmf-config | --texdir     | --texmfsysconfig |
+  +----------------+--------------------------------------+--------------+------------------+
+  | TEXMFHOME      | ~/texmf                              | --texuserdir | --texmfhome      |
+  | TEXMFVAR       | ~/.texliveYYYY/texmf-var             | --texuserdir | --texmfvar       |
+  | TEXMFCONFIG    | ~/.texliveYYYY/texmf-config          | --texuserdir | --texmfconfig    |
+  +----------------+--------------------------------------+--------------+------------------+
+
+In addition, as mentioned in the previous section, each tree has an
+environment variable C<TEXLIVE_INSTALL_>I<tree> which overrides the
+default; command line and profile settings both override environment
+variable settings.
+
+The defaults vary slightly on Macs, as explained above in L</OPTIONS>.
+
+For more on the directory trees and their intended usage, see the main
+TeX Live documentation at L<https://tug.org/texlive/doc>.
+
 =head1 AUTHORS AND COPYRIGHT
 
 This script and its documentation were written for the TeX Live

Modified: trunk/Master/tlpkg/installer/install-menu-text.pl
===================================================================
--- trunk/Master/tlpkg/installer/install-menu-text.pl	2022-06-18 20:06:28 UTC (rev 63642)
+++ trunk/Master/tlpkg/installer/install-menu-text.pl	2022-06-18 21:43:37 UTC (rev 63643)
@@ -154,7 +154,7 @@
       }
     }
     print "----\n";
-    print "[0] default mirror   http://mirror.ctan.org\n";
+    print "[0] default mirror   https://mirror.ctan.org\n";
     my $local_ind = "a";
     if ($#media_available >= 0) {
       print "Local repositories:\n";



More information about the tex-live-commits mailing list.