summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tl-update-tlnet
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-05-13 17:27:10 +0000
committerKarl Berry <karl@freefriends.org>2020-05-13 17:27:10 +0000
commit2f1f0d7573618a2e68993f1d256538038b2a1019 (patch)
tree935cc18e42eee2088ed70b140ca0ff37353794c7 /Master/tlpkg/bin/tl-update-tlnet
parent7bc4d5d5af13fc23119914408b8030f738af4e54 (diff)
install-tl: if envvar TEXLIVE_INSTALL_NO_RESUME is set, omit question
about importing settings. TLUtils.pm (install_packages): if $media != NET, abort immediately if a package cannot be installed; no retries. Also output args if debugging. Add TLUtils:: prefix to some other debugging lines. TLPDB.pm: TLPDB:: prefix on debugging line. tl-update-tlnet: show exact install-tl command that is run. Trying shortening command prefix to basename, on most messages. git-svn-id: svn://tug.org/texlive/trunk@55126 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tl-update-tlnet')
-rwxr-xr-xMaster/tlpkg/bin/tl-update-tlnet60
1 files changed, 31 insertions, 29 deletions
diff --git a/Master/tlpkg/bin/tl-update-tlnet b/Master/tlpkg/bin/tl-update-tlnet
index 9ca46072864..f20e8135b65 100755
--- a/Master/tlpkg/bin/tl-update-tlnet
+++ b/Master/tlpkg/bin/tl-update-tlnet
@@ -68,6 +68,7 @@ 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.
@@ -78,8 +79,8 @@ $Master/tlpkg/bin/tl-check-symlinks $Master/bin
test -z "$tltrybase" \
&& tltrybase=`cd $tlweb/../.. && pwd`/tlnet-trial-`date +%y%m%d`
tltry=$tltrybase/tlsrc.try
-echo "$0: Using tlweb=$tlweb" # top level network directory, mirrored
echo "$0: Using tltry=$tltry" # local working dir
+echo "$0: Using tlweb=$tlweb" # top level network directory, mirrored
# Save current tlpdb in case of disaster.
cp --force --backup $tlweb/tlpkg/texlive.tlpdb* /tmp
@@ -106,7 +107,7 @@ done
# Update packages in our working dir.
# These shell assignments have to come outside the cow-shell.
-echo "$0: Updating $tltry (from $Master) with 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"
@@ -116,10 +117,10 @@ update_install_invoke="$update_install_prog $gpgcmd -o $tltry"
#
cd $tltry
cow-shell <<END_COW
-echo "$0: Updating containers with (critical=$critical recreate=$recreate gpgcmd=$gpgcmd)"
-echo "$0: $containers_invoke"
+echo "$prg: Updating containers with (critical=$critical recreate=$recreate gpgcmd=$gpgcmd)"
+echo "$prg: $containers_invoke"
if $containers_invoke; then :; else
- echo "$0: tl-update-containers failed, goodbye." >&2
+ echo "$prg: tl-update-containers failed, goodbye." >&2
exit 1
fi
@@ -130,10 +131,10 @@ 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 "$0: Updating install pkg with"
- echo "$0: $update_install_invoke"
+ echo "$prg: Updating install pkg with"
+ echo "$prg: $update_install_invoke"
if $update_install_invoke; then :; else
- echo "$0: tl-update-install-pkg failed, goodbye." >&2
+ echo "$prg: tl-update-install-pkg failed, goodbye." >&2
exit 1
fi
else
@@ -157,10 +158,9 @@ tltryinst=$tltrybase/tlinst.try
zcat $tltry/install-tl-unx.tar.gz | tar -xf -
cd install-tl-* # subdir is YYYYMMDD
-# create TL install profile. We set TEXMFCACHE for the sake of
-# luaotfload-tool, although it should fall back to TEXMFVAR,
-# which is possibly used by nothing else.
-echo "# texlive-profile from $0
+# 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
@@ -186,10 +186,12 @@ TEXLIVE_INSTALL_NO_WELCOME=1; export TEXLIVE_INSTALL_NO_WELCOME
PATH=/usr/bin
tlnet_install_log=`pwd`/update-tlnet-install.log
-echo "$0: Running test install (log: $tlnet_install_log)..."
-perl install-tl -location $tltry -profile texlive.profile \
- >$tlnet_install_log 2>&1 \
- || true # install-tl can fail, but we test the output, so don't abort.
+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.
@@ -243,10 +245,10 @@ ignore_unexpected_output=false #true, if frustration
if test -n "$unexpected_output"; then
$ignore_unexpected_output || failure=true
echo >&2
- echo "$0: Test installation failed." >&2
- echo "$0: Here is the unexpected output, from $tlnet_install_log:" >&2
+ echo "$prg: Test installation failed." >&2
+ echo "$prg: Here is the unexpected output, from $tlnet_install_log:" >&2
echo "$unexpected_output" >&2
- echo "$0: (end of unexpected output)." >&2
+ echo "$prg: (end of unexpected output)." >&2
fi
# more consistency checks.
@@ -265,10 +267,10 @@ if test $failure = false; then
$check_consistency || continue
fi
basecmd=`basename $cmdname`
- echo "$0: Running $basecmd ($cmd)"
+ echo "$prg: Running $basecmd ($cmd)"
outfile=/tmp/tlnet.$basecmd
if $cmd >$outfile 2>&1; then :; else
- echo "$0: $basecmd failed ($cmd):" >&2
+ echo "$prg: $basecmd failed ($cmd):" >&2
sed 8q $outfile >&2
echo "... see $outfile for full output ..." >&2
echo >&2
@@ -284,7 +286,7 @@ 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 "$0: seems fmtutil failed, check $install_tl_log." >&2
+ echo "$prg: seems fmtutil failed, check $install_tl_log." >&2
failure=true
else
: # appease -e
@@ -297,18 +299,18 @@ test ! -r $install_tl_log || cp -f $install_tl_log /tmp
if $failure || $chicken; then
echo >&2
- echo "$0: Our transcript file: $tlnet_install_log" >&2
- echo "$0: install-tl log file: $install_tl_log" >&2
- echo "$0: Copies of both are in /tmp." >&2
- echo "$0: Please rm -rf the trial dir." >&2
+ echo "$prg: Our 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 "$0: Chicken mode, not updating anything."
+ echo "$prg: Chicken mode, not updating anything."
exit 0
else
- echo "$0: impossible non-failure non-chicken." >&2
+ echo "$prg: impossible non-failure non-chicken." >&2
exit 2
fi
fi
@@ -316,7 +318,7 @@ fi
#
# no unexpected output, so ship the new packages.
cd $tltrybase
-echo "$0: Updating $tlweb from $tltry."
+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