texlive[71611] Master/tlpkg/bin: Fix the tlpkg/ctan updater scripts
commits+mseven at tug.org
commits+mseven at tug.org
Mon Jun 24 09:28:40 CEST 2024
Revision: 71611
https://tug.org/svn/texlive?view=revision&revision=71611
Author: mseven
Date: 2024-06-24 09:28:40 +0200 (Mon, 24 Jun 2024)
Log Message:
-----------
Fix the tlpkg/ctan updater scripts to support multiple users on one system
Modified Paths:
--------------
trunk/Master/tlpkg/bin/c2a
trunk/Master/tlpkg/bin/c2l
trunk/Master/tlpkg/bin/c2lx
trunk/Master/tlpkg/bin/ctan2tl
Modified: trunk/Master/tlpkg/bin/c2a
===================================================================
--- trunk/Master/tlpkg/bin/c2a 2024-06-23 23:42:14 UTC (rev 71610)
+++ trunk/Master/tlpkg/bin/c2a 2024-06-24 07:28:40 UTC (rev 71611)
@@ -106,7 +106,7 @@
#
sub run_c2l {
my ($arg) = @_;
- my $tmpfile = "/tmp/c2l$arg.out";
+ my $tmpfile = "/tmp/@{[getlogin()]}-c2l$arg.out";
# don't bother with svn update unless we are doing place.
if ($arg eq "p") {
Modified: trunk/Master/tlpkg/bin/c2l
===================================================================
--- trunk/Master/tlpkg/bin/c2l 2024-06-23 23:42:14 UTC (rev 71610)
+++ trunk/Master/tlpkg/bin/c2l 2024-06-24 07:28:40 UTC (rev 71611)
@@ -119,11 +119,11 @@
print "$0: running ctan2tl @ARGV\n";
# we want our exit status to be from ctan2tl, not tee, hence the
# pipefail bash-ism.
- my @lines = `set -o pipefail; ctan2tl @ARGV </dev/null 2>&1 | tee /tmp/cl.out`;
+ my @lines = `set -o pipefail; ctan2tl @ARGV </dev/null 2>&1 | tee /tmp/@{[getlogin()]}-cl.out`;
my $status = $?;
my $cooked = "$TLROOT/Build/tmp.cooked";
- -d $cooked && system ("cp /tmp/cl.out $cooked/$ARGV[$#ARGV].out");
+ -d $cooked && system ("cp /tmp/@{[getlogin()]}-cl.out $cooked/$ARGV[$#ARGV].out");
# *** and other notable messages.
my @msgs = grep { /^\*\*\*.* \S/
@@ -146,10 +146,10 @@
my @page = split (/\f */, $whole_string, 4);
my $diff_list
- = `test -s /tmp/$<.tlplace.diff && sed -n -e 's/^--- //' \\
+ = `test -s /tmp/@{[getlogin()]}-$<.tlplace.diff && sed -n -e 's/^--- //' \\
-e 's/[ \\t].*//' \\
-e 's,/home/texlive/karl/, ,p' \\
- /tmp/$<.tlplace.diff`;
+ /tmp/@{[getlogin()]}-$<.tlplace.diff`;
$diff_list = "";
# page 0: build stuff.
Modified: trunk/Master/tlpkg/bin/c2lx
===================================================================
--- trunk/Master/tlpkg/bin/c2lx 2024-06-23 23:42:14 UTC (rev 71610)
+++ trunk/Master/tlpkg/bin/c2lx 2024-06-24 07:28:40 UTC (rev 71611)
@@ -13,9 +13,9 @@
#
# Additional argument "p" runs place also (same as c2l --place).
-dirsfile=/tmp/`id -u`.tlplace.dirs
+dirsfile=/tmp/@{[getlogin()]}-`id -u`.tlplace.dirs
cp /dev/null $dirsfile.tmp
-cp /dev/null /tmp/first
+cp /dev/null /tmp/@{[getlogin()]}-first
if test "x$1" = xe || test "x$1" = x2e; then
shift; label=l2e
@@ -65,9 +65,9 @@
for p in $pkgs; do
echo "${label} pkg $p" >&2 # progress report of a sort
printf "\f ${label} pkg $p\n"
- c2l "$@" $p | tee /tmp/c2l.out
- sed -n "1,/`printf '\f'`/p" /tmp/c2l.out >>/tmp/first
- echo >>/tmp/first
+ c2l "$@" $p | tee /tmp/@{[getlogin()]}-c2l.out
+ sed -n "1,/`printf '\f'`/p" /tmp/@{[getlogin()]}-c2l.out >>/tmp/@{[getlogin()]}-first
+ echo >>/tmp/@{[getlogin()]}-first
cat $dirsfile >>$dirsfile.tmp
done
@@ -74,4 +74,4 @@
sort -u $dirsfile.tmp >$dirsfile
wc $dirsfile
echo
-cat /tmp/first
+cat /tmp/@{[getlogin()]}-first
Modified: trunk/Master/tlpkg/bin/ctan2tl
===================================================================
--- trunk/Master/tlpkg/bin/ctan2tl 2024-06-23 23:42:14 UTC (rev 71610)
+++ trunk/Master/tlpkg/bin/ctan2tl 2024-06-24 07:28:40 UTC (rev 71611)
@@ -189,7 +189,7 @@
# show list of files (and tee to tmp).
find $pkg \! -type d -printf "%TY%Tm%Td.%TH%TM %p\n" | sort -k2 \
-| tee ${TMPDIR-/tmp}/ctan2tl.files
+| tee ${TMPDIR-/tmp}/"$USER"-ctan2tl.files
printf "\n$0: calling place $place_chicken $contrib_place_arg $pkg\n"
rm -rf $pkg.done
More information about the tex-live-commits
mailing list.