diff options
author | Karl Berry <karl@freefriends.org> | 2020-06-16 22:52:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-06-16 22:52:20 +0000 |
commit | 0adaaf2a67e5cb5da54192affc9b5f83ab8ff262 (patch) | |
tree | 812953f4a3993e9174708a1a11dc181242e588fb | |
parent | 835b22b71da638be141d3bcbc62fb9e7a22d9334 (diff) |
doc,sync
git-svn-id: svn://tug.org/texlive/trunk@55571 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/tests/TeXLive/TLUtils.pm | 94 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/texlive/NEWS | 3 | ||||
-rwxr-xr-x | Master/tlpkg/bin/archive/tl-update-testcow | 354 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tltestnet | 4 |
4 files changed, 418 insertions, 37 deletions
diff --git a/Build/source/texk/tests/TeXLive/TLUtils.pm b/Build/source/texk/tests/TeXLive/TLUtils.pm index cda2868c165..dc1b526d157 100644 --- a/Build/source/texk/tests/TeXLive/TLUtils.pm +++ b/Build/source/texk/tests/TeXLive/TLUtils.pm @@ -5,7 +5,7 @@ package TeXLive::TLUtils; -my $svnrev = '$Revision: 54629 $'; +my $svnrev = '$Revision: 55178 $'; my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown"; sub module_revision { return $_modulerevision; } @@ -281,11 +281,10 @@ by C<i386>. For the OS value we need a list because what's returned is not likely to match our historical names, e.g., C<config.guess> returns C<linux-gnu> -but we need C<linux>. This list contains old OSs which are not currently +but we need C<linux>. This list contains old OSs which are no longer supported, just in case. -If a particular platform is not found in this list we use the regexp -C</.*-(.*$)/> as a last resort and hope it provides something useful. +If the environment variable TEXLIVE_OS_NAME is set, it is used as-is. =cut @@ -294,6 +293,8 @@ sub platform_name { my $guessed_platform = $orig_platform; # try to parse out some bsd variants that use amd64. + # We throw away everything after the "bsd" to elide version numbers, + # as in amd64-unknown-midnightbsd1.2. $guessed_platform =~ s/^x86_64-(.*-k?)(free|net)bsd/amd64-$1$2bsd/; my $CPU; # CPU type as reported by config.guess. my $OS; # O/S type as reported by config.guess. @@ -310,16 +311,20 @@ sub platform_name { $CPU = $guessed_platform =~ /hf$/ ? "armhf" : "armel"; } - my @OSs = qw(aix cygwin darwin dragonfly freebsd hpux irix - kfreebsd linux netbsd openbsd solaris); - for my $os (@OSs) { - # Match word boundary at the beginning of the os name so that - # freebsd and kfreebsd are distinguished. - # Do not match word boundary at the end of the os so that - # solaris2 is matched. - $OS = $os if $guessed_platform =~ /\b$os/; - } - + if ($ENV{"TEXLIVE_OS_NAME"}) { + $OS = $ENV{"TEXLIVE_OS_NAME"}; + } else { + my @OSs = qw(aix cygwin darwin dragonfly freebsd hpux irix + kfreebsd linux midnightbsd netbsd openbsd solaris); + for my $os (@OSs) { + # Match word boundary at the beginning of the os name so that + # freebsd and kfreebsd are distinguished. + # Do not match word boundary at the end of the os so that + # solaris2 is matched. + $OS = $os if $guessed_platform =~ /\b$os/; + } + } + if (! $OS) { warn "$0: could not guess OS from config.guess string: $orig_platform"; $OS = "unknownOS"; @@ -397,6 +402,7 @@ sub platform_desc { 'alpha-linux' => 'GNU/Linux on DEC Alpha', 'amd64-freebsd' => 'FreeBSD on x86_64', 'amd64-kfreebsd' => 'GNU/kFreeBSD on x86_64', + 'amd64-midnightbsd'=> 'MidnightBSD on x86_64', 'amd64-netbsd' => 'NetBSD on x86_64', 'armel-linux' => 'GNU/Linux on ARM', 'armhf-linux' => 'GNU/Linux on ARMv6/RPi', @@ -544,7 +550,7 @@ and thus honors various env variables like C<TMPDIR>, C<TMP>, and C<TEMP>. sub initialize_global_tmpdir { $::tl_tmpdir = File::Temp::tempdir(CLEANUP => 1); - ddebug("initialize_global_tmpdir: creating global tempdir $::tl_tmpdir\n"); + ddebug("TLUtils::initialize_global_tmpdir: creating global tempdir $::tl_tmpdir\n"); return ($::tl_tmpdir); } @@ -558,7 +564,7 @@ is terminated. sub tl_tmpdir { initialize_global_tmpdir() if (!defined($::tl_tmpdir)); my $tmp = File::Temp::tempdir(DIR => $::tl_tmpdir, CLEANUP => 1); - ddebug("tl_tmpdir: creating tempdir $tmp\n"); + ddebug("TLUtils::tl_tmpdir: creating tempdir $tmp\n"); return ($tmp); } @@ -573,7 +579,7 @@ Arguments are passed on to C<File::Temp::tempfile>. sub tl_tmpfile { initialize_global_tmpdir() if (!defined($::tl_tmpdir)); my ($fh, $fn) = File::Temp::tempfile(@_, DIR => $::tl_tmpdir, UNLINK => 1); - ddebug("tl_tempfile: creating tempfile $fn\n"); + ddebug("TLUtils::tl_tempfile: creating tempfile $fn\n"); return ($fh, $fn); } @@ -1503,6 +1509,10 @@ sub install_packages { my $totalsize = 0; my $donesize = 0; my %tlpsizes; + debug("TLUtils::install_packages: fromtlpdb.root=$root, media=$media," + . " totlpdb.root=" . $totlpdb->root + . " what=$what ($totalnr), opt_src=$opt_src, opt_doc=$opt_doc\n"); + foreach my $p (@packs) { $tlpobjs{$p} = $fromtlpdb->get_package($p); if (!defined($tlpobjs{$p})) { @@ -1542,10 +1552,17 @@ sub install_packages { &$h($n,$totalnr); } # push $package to @packs_again if download failed + # (and not installing from disk). if (!$fromtlpdb->install_package($package, $totlpdb)) { - tlwarn("TLUtils::install_packages: Failed to install $package\n" - ."Will be retried later.\n"); - push @packs_again, $package; + tlwarn("TLUtils::install_packages: Failed to install $package\n"); + if ($media eq "NET") { + tlwarn(" $package will be retried later.\n"); + push @packs_again, $package; + } else { + # return false as soon as one package failed, since we won't + # be trying again. + return 0; + } } else { $donesize += $tlpsizes{$package}; } @@ -1981,7 +1998,7 @@ sub add_link_dir_dir { return 0; } if (-w $to) { - debug ("linking files from $from to $to\n"); + debug ("TLUtils::add_link_dir_dir: linking from $from to $to\n"); chomp (@files = `ls "$from"`); my $ret = 1; for my $f (@files) { @@ -2017,13 +2034,13 @@ sub add_link_dir_dir { sub remove_link_dir_dir { my ($from, $to) = @_; if ((-d "$to") && (-w "$to")) { - debug("removing links from $from to $to\n"); + debug("TLUtils::remove_link_dir_dir: removing links from $from to $to\n"); chomp (@files = `ls "$from"`); my $ret = 1; foreach my $f (@files) { next if (! -r "$to/$f"); if ($f eq "man") { - debug("not considering man in $to, it should not be from us!\n"); + debug("TLUtils::remove_link_dir_dir: not considering man in $to, it should not be from us!\n"); next; } if ((-l "$to/$f") && @@ -2031,7 +2048,7 @@ sub remove_link_dir_dir { $ret = 0 unless unlink("$to/$f"); } else { $ret = 0; - tlwarn ("not removing $to/$f, not a link or wrong destination!\n"); + tlwarn ("TLUtils::remove_link_dir_dir: not removing $to/$f, not a link or wrong destination!\n"); } } # try to remove the destination directory, it might be empty and @@ -2039,7 +2056,7 @@ sub remove_link_dir_dir { # `rmdir "$to" 2>/dev/null`; return $ret; } else { - tlwarn ("destination $to not writable, no removal of links done!\n"); + tlwarn ("TLUtils::remove_link_dir_dir: destination $to not writable, no removal of links done!\n"); return 0; } } @@ -2069,7 +2086,7 @@ sub add_remove_symlinks { # man my $top_man_dir = "$Master/texmf-dist/doc/man"; - debug("$mode symlinks for man pages to $sys_man from $top_man_dir\n"); + debug("TLUtils::add_remove_symlinks: $mode symlinks for man pages to $sys_man from $top_man_dir\n"); if (! -d $top_man_dir) { ; # better to be silent? #info("skipping add of man symlinks, no source directory $top_man_dir\n"); @@ -2099,7 +2116,7 @@ sub add_remove_symlinks { } #`rmdir "$sys_man" 2>/dev/null` if ($mode eq "remove"); } else { - tlwarn("man symlink destination ($sys_man) not writable, " + tlwarn("TLUtils::add_remove_symlinks: man symlink destination ($sys_man) not writable, " . "cannot $mode symlinks.\n"); $errors++; } @@ -2108,7 +2125,7 @@ sub add_remove_symlinks { # we collected errors in $errors, so return the negation of it if ($errors) { - info("$mode of symlinks had $errors error(s), see messages above.\n"); + info("TLUtils::add_remove_symlinks: $mode of symlinks had $errors error(s), see messages above.\n"); return $F_ERROR; } else { return $F_OK; @@ -2194,9 +2211,11 @@ for newly-downloaded files; see the calls in the C<unpack> routine sub check_file_and_remove { my ($xzfile, $checksum, $checksize) = @_; - debug("check_file $xzfile, $checksum, $checksize\n"); + my $fn_name = (caller(0))[3]; + debug("$fn_name $xzfile, $checksum, $checksize\n"); + if (!$checksum && !$checksize) { - tlwarn("TLUtils::check_file: neither checksum nor checksize " . + tlwarn("$fn_name: neither checksum nor checksize " . "available for $xzfile, cannot check integrity"); return; } @@ -2211,19 +2230,20 @@ sub check_file_and_remove { if ($checksum && ($checksum ne "-1") && $::checksum_method) { my $tlchecksum = TeXLive::TLCrypto::tlchecksum($xzfile); if ($tlchecksum ne $checksum) { - tlwarn("TLUtils::check_file: checksums differ for $xzfile:\n"); - tlwarn("TLUtils::check_file: tlchecksum=$tlchecksum, arg=$checksum\n"); + tlwarn("$fn_name: checksums differ for $xzfile:\n"); + tlwarn("$fn_name: tlchecksum=$tlchecksum, arg=$checksum\n"); + tlwarn("$fn_name: backtrace:\n" . backtrace()); # on Windows passing a pattern creates the tmpdir in PWD # which means that it will be tried to be created on the DVD # $check_file_tmpdir = File::Temp::tempdir("tlcheckfileXXXXXXXX"); $check_file_tmpdir = File::Temp::tempdir(); - tlwarn("TLUtils::check_file: removing $xzfile, " + tlwarn("$fn_name: removing $xzfile, " . "but saving copy in $check_file_tmpdir\n"); copy($xzfile, $check_file_tmpdir); unlink($xzfile); return; } else { - debug("TLUtils::check_file: checksums for $xzfile agree\n"); + debug("$fn_name: checksums for $xzfile agree\n"); # if we have checked the checksum, we don't need to check the size, too return; } @@ -2231,13 +2251,13 @@ sub check_file_and_remove { if ($checksize && ($checksize ne "-1")) { my $filesize = (stat $xzfile)[7]; if ($filesize != $checksize) { - tlwarn("TLUtils::check_file: removing $xzfile, sizes differ:\n"); - tlwarn("TLUtils::check_file: tlfilesize=$filesize, arg=$checksize\n"); + tlwarn("$fn_name: removing $xzfile, sizes differ:\n"); + tlwarn("$fn_name: tlfilesize=$filesize, arg=$checksize\n"); if (!defined($check_file_tmpdir)) { # the tmpdir should always be undefined, since we shouldn't get # here if the checksums failed, but test anyway. $check_file_tmpdir = File::Temp::tempdir("tlcheckfileXXXXXXXX"); - tlwarn("TLUtils::check_file: saving copy in $check_file_tmpdir\n"); + tlwarn("$fn_name: saving copy in $check_file_tmpdir\n"); copy($xzfile, $check_file_tmpdir); } unlink($xzfile); diff --git a/Master/texmf-dist/scripts/texlive/NEWS b/Master/texmf-dist/scripts/texlive/NEWS index c058c6055d5..d39d4d7a0ab 100644 --- a/Master/texmf-dist/scripts/texlive/NEWS +++ b/Master/texmf-dist/scripts/texlive/NEWS @@ -1,6 +1,9 @@ (This file public domain. Originally written by Norbert Preining and Karl Berry, 2010.) +<p><b>tlmgr 55369 (released 1jun20):</b> +<li>full logging of subcommands moved to new file tlmgr-commands.log. + <p><b>tlmgr 54446 (released 21mar20):</b> <li>full logging of subcommand (notably fmtutil) output in tlmgr.log. <li>tlmgr update --all --force does not update tlperl.w32. diff --git a/Master/tlpkg/bin/archive/tl-update-testcow b/Master/tlpkg/bin/archive/tl-update-testcow new file mode 100755 index 00000000000..29c48f4e04a --- /dev/null +++ b/Master/tlpkg/bin/archive/tl-update-testcow @@ -0,0 +1,354 @@ +#!/bin/sh -e +# Copyright 2008-2020 Norbert Preining +# This file is licensed under the GNU General Public License version 2 +# or any later version. +# +# Build a TeX Live tlnet area in a temporary directory, +# then (unless -N) do a test installation from it, +# then (if the test install succeeded), update the live area, +# all as specified in the options. + +vc_id='$Id: tl-update-tlnet 55186 2020-05-17 22:26:21Z karl $' +renice 20 $$ >/dev/null 2>&1 +unset CDPATH +unset LS_COLORS + +yyyy=2020 + +check_consistency=true +chicken=false +cow_shell=/bin/sh +critical= +pretest=false +recreate= +scheme=full +testinstall=true +tlweb=/home/texlive/tstftp/tstlive/tstnet +update_install_pkg=true +verbose= +gpgcmd= + +while test $# -gt 0; do + case $1 in + --cow) cow_shell=cow-shell;; # see comments below + --critical) critical=--all;; + --dest) shift; tlweb=$1;; + --dry-run|-n) chicken=true;; + --gpgcmd) shift; gpgcmd="--gpgcmd \"$1\"";; + --master) shift; Master=$1;; + --no-consistency) check_consistency=false;; # takes a long time. + --no-install-pkg) update_install_pkg=false;;# trunk update after freeze + --no-testinstall|-N) testinstall=false;; # and no updates; quit early. + --pretest) tlweb=/home/ftp/texlive/tlpretest;; + --recreate) recreate=--recreate;; + --scheme) shift; scheme=$1;; # scheme for test install. + --testlocation) shift; tltrybase=$1;; + -v|-vv|-vvv) verbose=$1;; + --help) echo "ustl. sorry."; exit 0;; + --version) echo "$vc_id"; exit 0;; + *) echo "$0: unrecognized option \`$1'; see source." >&2 + exit 1;; + esac + shift +done + +if test ! -r "$tlweb/tlpkg/texlive.tlpdb"; then + cat <<END_NO_TLPDB >&2 +$0: fatal: no file $tlweb/tlpkg/texlive.tlpdb. +$0: If you are setting up a new release, touch the file, +$0: and then use --critical --recreate. +$0: (Or otherwise set up the tlnet hierarchy manually.) +$0: Goodbye. +END_NO_TLPDB + # and typically we will fail because there are new messages + # in the installer. move the trial dir by hand to avoid + # time-consuming full recreate more than once. + exit 1 +fi + +if test -z "$Master"; then + mydir=`dirname $0` + Master=`cd $mydir/../.. && pwd` +fi +prg=`basename $0` + +# If there are broken symlinks anywhere in the bin directories, give up +# right away. The nightly cron checks that there no symlinks anywhere else. +# Below, we check for broken symlinks in the bin/ dir as installed. +$Master/tlpkg/bin/tl-check-symlinks $Master/bin + +# Keep the default out of ~ftp/texlive, which CTAN mirrors much of. +test -z "$tltrybase" \ +&& tltrybase=`cd $tlweb/../.. && pwd`/tlnet-trial-`date +%y%m%d` +tltry=$tltrybase/tlsrc.try +echo "$0: running from Master=$Master" +echo "$0: working in tltry=$tltry" +echo "$0: output to tlweb=$tlweb" + +# Save current tlpdb in case of disaster. +cp --force --backup $tlweb/tlpkg/texlive.tlpdb* /tmp + +# +# Be sure we're starting the test cleanly. +rm -rf $tltrybase +mkdir -p $tltry + +# Keep new directory group-writable to texlive so MacTeX maintainer +# can update it too. +chmod g+ws $tltry +chgrp texlive $tltry || : # in case of strange system + +# cp/link files in a loop so we can exclude the mactex files, which is a +# waste of time, and more importantly can uselessly fail due to permissions. +for f in $tlweb/*; do + if echo "$f" | grep mactex >/dev/null; then + : # skip mactex + elif test "x$cow_shell" = xcow-shell; then + cp -al "$f" $tltry # assume GNU cp so we can link instead of copy + # However, cow-shell is evidently introducing strange errors on the + # tug.org server we switched to in 2020, causing the release (tlnet) + # directory to be modified even when changes should be kept to the + # test (tltry) directory (ultimately resulting in checksum errors + # since the containers and tlpdb don't match, after a failed rebuild). + # This can be confirmed with a test hierarchy and build; see tltestnet. + # So, do not use cow-shell. + else + # no cow-shell, straight copy. + cp -a "$f" $tltry # still assuming GNU cp for -a + fi +done + +# Update packages in our working dir. +# These shell assignments have to come outside the cow-shell. +echo "$prg: Updating $tltry (from $Master) with $cow_shell..." +containers_prog="$Master/tlpkg/bin/tl-update-containers" +containers_args=" $verbose -location $tltry $critical $recreate $gpgcmd" +containers_invoke="$containers_prog $containers_args" +# +update_install_prog=$Master/tlpkg/bin/tl-update-install-pkg +update_install_invoke="$update_install_prog $gpgcmd -o $tltry" +# +cd $tltry +strace_file=$tltry/tlpkg/texlive.tlpdb.md5 +strace -o /tmp/s.log -f -P $strace_file $cow_shell <<END_COW +echo "$prg: Updating containers with (critical=$critical recreate=$recreate gpgcmd=$gpgcmd)" +echo "$prg: $containers_invoke" +if $containers_invoke; then :; else + echo "$prg: tl-update-containers failed, goodbye." >&2 + exit 1 +fi + +# We don't want to update the install packages if we're updating the +# "frozen" release (tlnet-final) after we've moved on to the pretest. +# See tlpkg/doc/releng.txt. +if $update_install_pkg; then + # It is scary, but I guess we should update the installer package every + # day, partly for the sake of doc.html and partly so it actually gets + # tested. Hopefully we don't break the Perl modules very often. + echo "$prg: Updating install pkg with" + echo "$prg: $update_install_invoke" + if $update_install_invoke; then :; else + echo "$prg: tl-update-install-pkg failed, goodbye." >&2 + exit 1 + fi +else + : +fi +END_COW + +# cow-shell leaves this around, haven't tracked down (or reported). +#rm -f $tltry/.ilist + +# if not doing the test installation, don't push anything out. +$testinstall || exit 0 + +# +# Now we have an updated tlweb in $tltry where only the changed files +# are actual files, the rest are hard links. +# Try to make a test installation. +cd $tltrybase +tltryinst=$tltrybase/tlinst.try + +zcat $tltry/install-tl-unx.tar.gz | tar -xf - +cd install-tl-* # subdir is YYYYMMDD + +# create test TL install profile. +# We set TEXMFVAR for the sake of luaotfload-tool. +echo "# texlive-profile from $0 `date` +selected_scheme scheme-$scheme +TEXDIR $tltryinst/$yyyy +TEXMFLOCAL $tltryinst/texmf-local +TEXMFSYSCONFIG $tltryinst/$yyyy/texmf-config +TEXMFSYSVAR $tltryinst/$yyyy/texmf-var +TEXMFVAR $tltryinst/$yyyy/texmf-uvar +TEXMFHOME ~/texmf +tlpdbopt_install_docfiles 1 +tlpdbopt_install_srcfiles 1 +tlpdbopt_create_formats 1 +instopt_letter 0 +instopt_adjustpath 0 +instopt_adjustrepo 1 +" >texlive.profile + +# silence envvar warnings and the welcome message. +TEXLIVE_INSTALL_ENV_NOCHECK=1; export TEXLIVE_INSTALL_ENV_NOCHECK +TEXLIVE_INSTALL_NO_WELCOME=1; export TEXLIVE_INSTALL_NO_WELCOME + +# Minimal PATH from here on! E.g., we don't want the test install to +# find its own mktexlsr, but only have the programs in the test +# environment available. +PATH=/usr/bin + +tlnet_install_log=`pwd`/update-tlnet-install.log +tlnet_install_cmd="install-tl -location $tltry -profile texlive.profile" +echo "$prg: Running test install (log: $tlnet_install_log)..." +echo "$prg: (in `pwd`)" +echo "$prg: $tlnet_install_cmd" +perl $tlnet_install_cmd >$tlnet_install_log 2>&1 \ +|| true # install-tl can fail, but we test the output, so don't abort. + +# the following long grep command should filter away all *normal* +# installation messages. +# if there are any other messages they will end up on stdout and +# thus be noticed. +unexpected_output=`cat $tlnet_install_log \ + | sed '/The following environment variables/,/^ ------/d' \ + | grep -Ev '^ ------' \ + | grep -Ev '^$' \ + | grep -Ev '^cryptographic signature of' \ + | grep -Ev '^xAutomated TeX Live installation using profile' \ + | grep -Ev '^Installing from:' \ + | grep -Ev '^Platform: ' \ + | grep -Ev '^Distribution: inst' \ + | grep -Ev '^Directory for temporary files' \ + | grep -Ev '^Loading ' \ + | grep -Ev '^Installing ' \ + | grep -Ev '^(re-)?running mktexlsr' \ + | grep -Ev '^mktexlsr: Updating ' \ + | grep -Ev '^mktexlsr: Done' \ + | grep -Ev '^writing fmtutil.cnf to' \ + | grep -Ev '^writing updmap.cfg to' \ + | grep -Ev '^writing language.(dat|def|dat.lua) to' \ + | grep -Ev '^pre-generating all format file' \ + | grep -Ev '^making ConTeXt MkIV cache' \ + | grep -Ev '^running ' \ + | grep -Ev '^done running ' \ + | grep -Ev '^finished ' \ + | grep -Ev '^Welcome to TeX Live' \ + | grep -Ev '^The TeX Live web site' \ + | grep -Ev '^contains updates' \ + | grep -Ev '^TeX Live is a joint project of the TeX user groups' \ + | grep -Ev '^please consider supporting it by joining the group' \ + | grep -Ev '^The list of groups is available' \ + | grep -Ev '^Add ' \ + | grep -Ev '^Most importantly, add ' \ + | grep -Ev '^to your PATH for current and future sessions' \ + | grep -Ev ' \(if not dynamically found\)' \ + | grep -Ev 'install-tl: done' \ + | grep -Ev '^Logfile: ' \ + | grep -Ev '^Time used for installing ' \ + | grep -Ev '^setting up ConTeXt cache' \ + | grep -Ev '^resolvers +\|' \ + | grep -Ev '^system +\|' \ + | grep -Ev '^mtxrun +\|' \ + | grep -Ev '^done$' \ + | cat` + +failure=false +ignore_unexpected_output=false #true, if frustration +if test -n "$unexpected_output"; then + $ignore_unexpected_output || failure=true + echo >&2 + echo "$prg: Test installation failed." >&2 + echo "$prg: Here is the unexpected output, from $tlnet_install_log:" >&2 + echo "$unexpected_output" >&2 + echo "$prg: (end of unexpected output)." >&2 +fi + +# more consistency checks. +if test $failure = false; then + for cmd in \ + "$Master/tlpkg/bin/tlgpg-verify $tltry/tlpkg/texlive.tlpdb.sha512" \ + "$Master/tlpkg/bin/tl-compare-tlpdbs $critical $tltry/tlpkg/texlive.tlpdb" \ + "$Master/tlpkg/bin/tl-check-symlinks $tltryinst/$yyyy/bin" \ + "$tltryinst/$yyyy/bin/*/tlmgr --repository $tltry update --list" \ + "$tltryinst/$yyyy/bin/*/updmap-sys -n" \ + "$tltryinst/$yyyy/bin/*/mktexlsr -n --verbose" \ + "$Master/tlpkg/bin/tl-check-tlnet-consistency --location=$tltry" \ + ; do + cmdname=`echo "$cmd" | awk '{print $1}'` + if echo "$cmdname" | grep check-tlnet-consistency >/dev/null; then + # skip consistency check if requested (for development only). + $check_consistency || continue + fi + basecmd=`basename $cmdname` + echo "$prg: Running $basecmd ($cmd)" + outfile=/tmp/tlnet.$basecmd + if $cmd >$outfile 2>&1; then :; else + echo "$prg: $basecmd failed ($cmd):" >&2 + sed 8q $outfile >&2 + echo "... see $outfile for full output ..." >&2 + echo >&2 + failure=true + fi + done +fi + +# Format creation check, in case fmtutil's exit status wasn't right. +# This might not exist if the test install didn't get this far. +install_tl_log=$tltryinst/$yyyy/install-tl.log + +if test -r $install_tl_log \ + && grep -i '^fmtutil.*error.*' $install_tl_log >/dev/null; then + echo >&2 + echo "$prg: seems fmtutil failed, check $install_tl_log." >&2 + failure=true +else + : # appease -e +fi + +# In all cases, make copies in /tmp for inspection in case of +# undetected failure. +cp -f $tlnet_install_log /tmp +test ! -r $install_tl_log || cp -f $install_tl_log /tmp + +if $failure || $chicken; then + echo >&2 + echo "$prg: tl-update-tlnet transcript file: $tlnet_install_log" >&2 + echo "$prg: install-tl log file: $install_tl_log" >&2 + echo "$prg: Copies of both are in /tmp." >&2 + echo "$prg: Please rm -rf the trial dir." >&2 + if $failure; then + exit 1 + elif $chicken; then + echo + echo "$prg: Chicken mode, not updating anything." + exit 0 + else + echo "$prg: impossible non-failure non-chicken." >&2 + exit 2 + fi +fi + +# +# no unexpected output, so ship the new packages. +cd $tltrybase +echo "$prg: Updating $tlweb from $tltry." +# copy any mactex files since we didn't link them. +for f in $tlweb/*mactex*; do + test ! -r $f || cp -pf $f $tltry +done + +# mv then rm to avoid the mirmon probe failing during the rm. +mv $tlweb $tltrybase/tlnet.old +mv $tltry $tlweb +rm -rf $tltrybase + +# We checked this above also, but check again. +# We've removed the cwd, so cd out of it. +cd /tmp || exit 1 +$Master/tlpkg/bin/tlgpg-verify $tlweb/tlpkg/texlive.tlpdb.sha512 + +echo "$0: Done." + +exit 0 diff --git a/Master/tlpkg/bin/tltestnet b/Master/tlpkg/bin/tltestnet index 75ab0544add..3a36fa5c90c 100755 --- a/Master/tlpkg/bin/tltestnet +++ b/Master/tlpkg/bin/tltestnet @@ -28,3 +28,7 @@ fi # run out of PATH, not the reference tree. tl-update-tlnet --dest $testnet --scheme $scheme $install_pkg $consistency + +# for when we were testing with cow-shell; we have given up on it nowadays. +# tl-update-testcow is in archive/. +#tl-update-testcow --cow --dest $testnet --scheme $scheme $install_pkg $consistency |