From 4603aac25e5b97e68bb866d3201a44a17f95e20c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 31 Jan 2019 19:24:19 +0000 Subject: install-tl (do_postinst_stuff): die if mktexlsr fails, don't just warn. (read_profile): check for [01] value for binary_* and collection_*, and for nonempty selected_scheme and path variables. doc (unrelated, sorry): use https://tug.org urls. tl-try-install: use realpath to resolve $0, include --custom-bin example. TLinfra+none.pro: omit installing x86_64-linux. git-svn-id: svn://tug.org/texlive/trunk@49884 c570f23f-e606-0410-a88d-b1316a301751 --- Master/install-tl | 71 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 30 deletions(-) (limited to 'Master/install-tl') diff --git a/Master/install-tl b/Master/install-tl index 86287ba21f7..95356a003fd 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -500,7 +500,7 @@ if (($opt_gui ne "extl") && ($opt_gui ne "text") && !$opt_no_gui && ($opt_profil if ($@) { # that didn't work out, so warn the user and continue with text mode tlwarn("Cannot load Tk, maybe something is missing and\n"); - tlwarn("maybe http://tug.org/texlive/distro.html#perltk can help.\n"); + tlwarn("maybe https://tug.org/texlive/distro.html#perltk can help.\n"); tlwarn("Error message from loading Tk:\n"); tlwarn(" $@\n"); tlwarn("Continuing in text mode...\n"); @@ -794,7 +794,7 @@ and the repository being accessed are not compatible: repository: $texlive_release Perhaps you need to use a different CTAN mirror? (For more, see the output of install-tl --help, especially the - -repository option. Online via http://tug.org/texlive/doc.) + -repository option. Online via https://tug.org/texlive/doc.) ============================================================================= END_MISMATCH } @@ -903,8 +903,7 @@ sub do_installation { } if ($vars{'selected_scheme'} ne "scheme-infraonly" && $vars{'n_collections_selected'} <= 0) { - tlwarn("Nothing selected, nothing to install, exiting!\n"); - exit 1; + tldie("$0: Nothing selected, nothing to install, exiting!\n"); } # maybe_make_ro tests for admin, local drive and NTFS before proceeding. # making the root read-only automatically locks everything below it. @@ -942,7 +941,7 @@ sub do_installation { && ! -e "$vars{TEXDIR}/release-texlive.txt") { copy("$::installerdir/release-texlive.txt", "$vars{TEXDIR}/"); } - + # calc_depends(); save_options_into_tlpdb(); # we need to do that dir, since we use the TLPDB->install_package which @@ -1126,7 +1125,7 @@ operations might be disturbed.\n\n"; my $errcount = 0; if (!$opt_in_place) { - $errcount += wsystem("running", 'mktexlsr', "$TEXDIR/texmf-dist"); + wsystem("running", 'mktexlsr', "$TEXDIR/texmf-dist") && exit(1); } # we have to generate the various config file. That could be done with @@ -1165,8 +1164,9 @@ operations might be disturbed.\n\n"; "$TEXMFSYSVAR/tex/generic/config/language.dat.lua", "$TEXMFLOCAL/tex/generic/config/language-local.dat.lua"); - $errcount += wsystem("running", "mktexlsr", - $TEXMFSYSVAR, $TEXMFSYSCONFIG, "$TEXDIR/texmf-dist"); + wsystem("running", "mktexlsr", + $TEXMFSYSVAR, $TEXMFSYSCONFIG, "$TEXDIR/texmf-dist") + && exit(1); if (-x "$plat_bindir/updmap-sys$progext") { $errcount += run_postinst_cmd("updmap-sys --nohash"); @@ -1196,7 +1196,7 @@ operations might be disturbed.\n\n"; } # now rerun mktexlsr for updmap-sys and tlmgr paper letter updates. - $errcount += wsystem("re-running", "mktexlsr", $TEXMFSYSVAR,$TEXMFSYSCONFIG); + wsystem("re-running", "mktexlsr", $TEXMFSYSVAR, $TEXMFSYSCONFIG) && exit(1); if (win32() and !$vars{'instopt_portable'} and !$opt_in_place) { if ($vars{'tlpdbopt_desktop_integration'} != 2) { @@ -1763,7 +1763,7 @@ sub load_tlpdb { 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 +https://tug.org/texlive/doc/install-tl.html (or in the output of install-tl --help). You can also rerun the installer with -select-repository @@ -2025,14 +2025,22 @@ sub read_profile { $vars{$_} = $pro{$_}; delete($pro{$_}); } - } elsif (defined($path_keys{$_}) - || m/^(selected_scheme$|binary|collection-)/) { + + } elsif (defined($path_keys{$_}) || m/^selected_scheme$/) { if ($pro{$_}) { $vars{$_} = $pro{$_}; + delete($pro{$_}); } else { - tldie("$0: Profile key must not be empty, quitting: $_\n"); + tldie("$0: Quitting, profile key for path $_ must not be empty.\n"); + } + + } elsif (m/^(binary|collection-)/) { + if ($pro{$_} =~ /^[01]$/) { + $vars{$_} = $pro{$_}; + delete($pro{$_}); + } else { + tldie("$0: Quitting, profile key for $_ must be 0 or 1, not: $pro{$_}\n"); } - delete($pro{$_}); } } #require Data::Dumper; @@ -2126,6 +2134,7 @@ sub do_install_packages { # for later complete removal we want to save some options and values # into the local tlpdb: # - should links be set, and if yes, the destination (bin,man,info) +# sub save_options_into_tlpdb { # if we are told to adjust the repository *and* we are *not* # installing from the network already, we adjust the repository @@ -2149,7 +2158,9 @@ sub save_options_into_tlpdb { if ($opt_custom_bin) { push @archs, "custom"; } - + if (! @archs) { + tldie("$0: No binary platform specified/available, quitting.\n"); + } # only if we forced the platform we do save this option into the tlpdb if (defined($opt_force_arch)) { $localtlpdb->setting ("platform", $::_platform_); @@ -2525,7 +2536,7 @@ sub create_welcome { push @::welcome_arr, __("Welcome to TeX Live!"); push @::welcome_arr, "\n"; push @::welcome_arr, __( - "See %s/index.html for links to documentation.\nThe TeX Live web site (http://tug.org/texlive/) contains any updates and corrections. TeX Live is a joint project of the TeX user groups around the world; please consider supporting it by joining the group best for you. The list of groups is available on the web at http://tug.org/usergroups.html.", + "See %s/index.html for links to documentation.\nThe TeX Live web site (https://tug.org/texlive/) contains any updates and corrections. TeX Live is a joint project of the TeX user groups around the world; please consider supporting it by joining the group best for you. The list of groups is available on the web at https://tug.org/usergroups.html.", $::vars{'TEXDIR'}); if (!win32()) { push @::welcome_arr, "\n"; @@ -2635,7 +2646,7 @@ This installer creates a runnable TeX Live installation from various media, including over the network, from local hard disk, a DVD, etc. The installer works on all platforms supported by TeX Live. For information on initially downloading TeX Live, see -L. +L. The basic idea of TeX Live installation is for you to choose one of the top-level I, each of which is defined as a different set of @@ -2655,13 +2666,13 @@ highly recommended. Post-installation configuration, package updates, and more, are handled through B(1), the TeX Live Manager -(L). +(L). The most up-to-date version of this installer documentation is on the -Internet at L. +Internet at L. For the full documentation of TeX Live, see -L. +L. =head1 OPTIONS @@ -2706,7 +2717,7 @@ all the options of the perltk GUI. The C and C modules, and thus also when calling with bare C<-gui> (with no I), require the Perl/Tk module -(L); if Perl/Tk is not +(L); if Perl/Tk is not available, installation continues in text mode. The tcl GUI requires Tcl/Tk. This is part of Mac OS and is often @@ -2736,12 +2747,12 @@ simplified Chinese (zh_CN), and traditional Chinese (zh_TW). Specify the package repository to be used as the source of the installation. In short, this can be a directory name or a url using http(s), ftp, or scp. The documentation for C has the details -(L). +(L). For installation, the default is to pick a mirror automatically, using L; the chosen mirror is used for the entire download. You can use the special argument C -as an abbreviation for this. (See L for more about CTAN +as an abbreviation for this. (See L for more about CTAN and its mirrors.) After installation is complete, you can use that installation as the @@ -2778,8 +2789,8 @@ actions. To install multiple custom binary sets, manully rename C before doing each. For more information on custom binaries, see -L. For general information on -building TeX Live, see L. +L. For general information on +building TeX Live, see L. =item B<-debug-translation> @@ -2796,7 +2807,7 @@ runnable, or installation will fail. C<-force-arch> is a synonym. =item B<-help>, B<--help>, B<-?> Display this help and exit. (This help is also on the web at -L). Sometimes the C +L). Sometimes the C and/or C programs on the system have problems, possibly resulting in control characters being literally output. This can't always be detected, but you can set the C environment variable and @@ -2853,7 +2864,7 @@ By default, if a GnuPG C binary is found in PATH, downloads are verified against a cryptographic signature. This option disables such verification. The full description is in the Crytographic Verification section of the C documentation, e.g., -L +L =item B<-non-admin> @@ -3031,7 +3042,7 @@ accepted and transformed to the names given above. When a profile is written, the names above are always used. For more details on all of the above options, consult the TeX Live -installation manual, linked from L. +installation manual, linked from L. =head1 ENVIRONMENT VARIABLES @@ -3050,7 +3061,7 @@ user installations. These override the normal choice of a download program; see the C documentation, e.g., -L. +L. =item C @@ -3099,7 +3110,7 @@ Don't try to run the C<--help> message through C. =head1 AUTHORS AND COPYRIGHT This script and its documentation were written for the TeX Live -distribution (L) and both are licensed under the +distribution (L) and both are licensed under the GNU General Public License Version 2 or later. $Id$ -- cgit v1.2.3