summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-10-21 22:56:43 +0000
committerKarl Berry <karl@freefriends.org>2019-10-21 22:56:43 +0000
commit4c4e6e13c9251eab027e09bbc0b0bfaff6fe0659 (patch)
treefef1f590d520bb982b905a2fa7e619e469b7a5c8
parent9d7a6a76622efee73dfd7a7523f8c06af373a1f5 (diff)
Add -dest option instead of using non-option arguments for dest.
Use update-tlnet-install.log for our test install, install.log is too generic. Don't assume the log from install-tl itself exists. Tweak output and comments. git-svn-id: svn://tug.org/texlive/trunk@52484 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/tlpkg/bin/tl-update-tlnet65
1 files changed, 38 insertions, 27 deletions
diff --git a/Master/tlpkg/bin/tl-update-tlnet b/Master/tlpkg/bin/tl-update-tlnet
index 9fe3afddd08..3efddd47116 100755
--- a/Master/tlpkg/bin/tl-update-tlnet
+++ b/Master/tlpkg/bin/tl-update-tlnet
@@ -3,7 +3,10 @@
# This file is licensed under the GNU General Public License version 2
# or any later version.
#
-# Update a TeX Live tlnet area, with testing.
+# 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$'
unset CDPATH
@@ -25,30 +28,25 @@ gpgcmd=
while test $# -gt 0; do
case $1 in
--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-testinstall|-N) testinstall=false;; # and no updates; quit early.
--pretest) tlweb=/home/ftp/texlive/tlpretest;;
--recreate) recreate=--recreate;;
- --scheme) shift; scheme=$1;;
- --gpgcmd) shift; gpgcmd="--gpgcmd \"$1\"";;
+ --scheme) shift; scheme=$1;; # scheme for test install.
--testlocation) shift; tltrybase=$1;;
- -v|-vv|-vvv) verbose=$1;;
+ -v|-vv|-vvv) verbose=$1;;
--help) echo "ustl. sorry."; exit 0;;
--version) echo "$vc_id"; exit 0;;
- --*) echo "$0: unrecognized option \`$1'." >&2
- exit 1;;
- *) tlweb=$1;;
+ *) echo "$0: unrecognized option \`$1'; see source." >&2
+ exit 1;;
esac
shift
done
-if test -z "$Master"; then
- mydir=`dirname $0`
- Master=`cd $mydir/../.. && pwd`
-fi
-
if test ! -r "$tlweb/tlpkg/texlive.tlpdb"; then
cat <<END_NO_TLPDB >&2
$0: fatal: no file $tlweb/tlpkg/texlive.tlpdb.
@@ -63,14 +61,22 @@ END_NO_TLPDB
exit 1
fi
-# Keep the default out of ~ftp/texlive/tlnet, which CTAN mirrors.
+# don't let cwd interfere; shouldn't matter, but just in case.
+cd "$HOME" || exit 1
+
+if test -z "$Master"; then
+ mydir=`dirname $0`
+ Master=`cd $mydir/../.. && pwd`
+fi
+
+# 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: Using tlweb=$tlweb" # top level network directory, mirrored
+echo "$0: Using tlweb=$tlweb" # top level network directory, mirrored
echo "$0: Using tltry=$tltry" # local working dir
-# Save tlpdb in case of disaster.
+# Save current tlpdb in case of disaster.
cp --force --backup $tlweb/tlpkg/texlive.tlpdb* /tmp
#
@@ -91,12 +97,15 @@ done
# Update packages in our working dir.
echo "$0: Updating $tltry 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"
+#
cd $tltry
cow-shell <<END_COW
-echo "$0: Running tl-update-containers (from $Master) with"
-echo "$0: gpgcmd=$gpgcmd critical=$critical recreate=$recreate ..."
-$Master/tlpkg/bin/tl-update-containers $gpgcmd \
- $verbose -location $tltry $critical $recreate
+echo "$0: Updating containers with (critical=$critical recreate=$recreate gpgcmd=$gpgcmd)"
+echo "$0: $containers_invoke"
+$containers_invoke
# 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
@@ -105,9 +114,6 @@ echo "$0: Running tl-update-install-pkg (also from $Master)..."
$Master/tlpkg/bin/tl-update-install-pkg $gpgcmd -o $tltry
END_COW
-# cow-shell might leave this around.
-rm -f $tltry/.ilist
-
# if not doing the test installation, don't push anything out.
$testinstall || exit 0
@@ -140,7 +146,7 @@ instopt_adjustrepo 1
TEXLIVE_INSTALL_ENV_NOCHECK=1; export TEXLIVE_INSTALL_ENV_NOCHECK
TEXLIVE_INSTALL_NO_WELCOME=1; export TEXLIVE_INSTALL_NO_WELCOME
-tlnet_install_log=`pwd`/install.log
+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 \
@@ -194,12 +200,14 @@ unexpected_output=`cat $tlnet_install_log \
| cat`
failure=false
+ignore_unexpected_output=false #true, if frustration
if test -n "$unexpected_output"; then
- failure=true
+ $ignore_unexpected_output || failure=true
echo >&2
echo "$0: Test installation failed." >&2
- echo "$0: Here is the unexpected output:" >&2
+ echo "$0: Here is the unexpected output from $tlnet_install_log:" >&2
echo "$unexpected_output" >&2
+ echo "$0: (end of unexpected output)." >&2
fi
# more consistency checks.
@@ -229,9 +237,11 @@ if test $failure = false; then
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 grep -i '^fmtutil.*error.*' $install_tl_log >/dev/null; then
+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
failure=true
@@ -239,7 +249,8 @@ fi
# In all cases, make copies in /tmp for inspection in case of
# undetected failure.
-cp -f $tlnet_install_log $install_tl_log /tmp
+cp -f $tlnet_install_log /tmp
+test ! -r $install_tl_log || cp -f $install_tl_log /tmp
if $failure; then
echo >&2