texlive[74382] Master/tlpkg: use uid consistently for tmp prefix

commits+karl at tug.org commits+karl at tug.org
Sun Mar 2 00:17:27 CET 2025


Revision: 74382
          https://tug.org/svn/texlive?view=revision&revision=74382
Author:   karl
Date:     2025-03-02 00:17:26 +0100 (Sun, 02 Mar 2025)
Log Message:
-----------
use uid consistently for tmp prefix

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/c2a
    trunk/Master/tlpkg/bin/c2l
    trunk/Master/tlpkg/bin/ctan2tl
    trunk/Master/tlpkg/bin/tl-update-lmtx-bin
    trunk/Master/tlpkg/libexec/place

Modified: trunk/Master/tlpkg/bin/c2a
===================================================================
--- trunk/Master/tlpkg/bin/c2a	2025-03-01 23:12:04 UTC (rev 74381)
+++ trunk/Master/tlpkg/bin/c2a	2025-03-01 23:17:26 UTC (rev 74382)
@@ -106,7 +106,7 @@
 # 
 sub run_c2l {
   my ($arg) = @_;
-  my $tmpfile = "/tmp/@{[getlogin()]}-c2l$arg.out";
+  my $tmpfile = "/tmp/$<.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	2025-03-01 23:12:04 UTC (rev 74381)
+++ trunk/Master/tlpkg/bin/c2l	2025-03-01 23:17:26 UTC (rev 74382)
@@ -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/@{[getlogin()]}-cl.out`;
+  my @lines = `set -o pipefail; ctan2tl @ARGV </dev/null 2>&1 | tee /tmp/$<.cl.out`;
   my $status = $?;
 
   my $cooked = "$TLROOT/Build/tmp.cooked";
-  -d $cooked && system ("cp /tmp/@{[getlogin()]}-cl.out $cooked/$ARGV[$#ARGV].out");
+  -d $cooked && system ("cp /tmp/$<.cl.out $cooked/$ARGV[$#ARGV].out");
   
   # *** and other notable messages.
   my @msgs = grep { /^\*\*\*.* /
@@ -146,10 +146,10 @@
   my @page = split (/\f */, $whole_string, 4);
   
   my $diff_list
-    = `test -s /tmp/@{[getlogin()]}-$<.tlplace.diff && sed -n -e 's/^--- //' \\
+    = `test -s /tmp/$<.tlplace.diff && sed -n -e 's/^--- //' \\
               -e 's/[ \\t].*//' \\
               -e 's,/home/texlive/karl/, ,p' \\
-           /tmp/@{[getlogin()]}-$<.tlplace.diff`;
+           /tmp/$<.tlplace.diff`;
   $diff_list = "";
 
   # page 0: build stuff.

Modified: trunk/Master/tlpkg/bin/ctan2tl
===================================================================
--- trunk/Master/tlpkg/bin/ctan2tl	2025-03-01 23:12:04 UTC (rev 74381)
+++ trunk/Master/tlpkg/bin/ctan2tl	2025-03-01 23:17:26 UTC (rev 74382)
@@ -22,7 +22,7 @@
 cd $raw || exit 1
 
 if test "x$1" = x--help; then
-  echo "Usage: $0 [--place] [--no-ctan] [--git] TLPKGNAME"
+  echo "Usage: $0 [OPTION]... TLPKGNAME"
   echo
   echo "Install a package from CTAN into TeX Live."
   echo
@@ -31,8 +31,8 @@
   echo "--contrib     for https://contrib.texlive.info."
   echo "--git         for git."
   echo
-  echo "This never actually commits anything to the repository,"
-  echo "but it does svn update the potentially affected directories."
+  echo "This never actually commits anything to the repository, but"
+  echo "by default it does svn update the potentially affected directories."
   echo
   echo "Without --place, it only creates files in Build/tmp.{raw,cooked}."
   echo "With --place, it also does repository adds and removes,"
@@ -48,6 +48,7 @@
 contrib_ctan2tds_arg=
 contrib_place_arg=
 mode=svn
+opt_no_final_svn=
 pkg=
 while test $# -gt 0; do
   case "$1" in
@@ -66,6 +67,9 @@
     '--git')
       mode="git"
       shift;;
+     --no-final-svn-update)
+       opt_no_final_svn=$1
+       shift;;
     */*)
       echo "$0: package name must not contain /: $1" >&2
       exit 1;;
@@ -185,11 +189,11 @@
 
 # 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}/"$USER"-ctan2tl.files
+| tee ${TMPDIR-/tmp}/$UID.ctan2tl.files
 
 printf "\n$0: calling place $place_chicken $contrib_place_arg $pkg\n"
 rm -rf $pkg.done
-place $place_chicken --no-final-svn-update --mode $mode $contrib_place_arg $pkg
+place $place_chicken $opt_no_final_svn --mode $mode $contrib_place_arg $pkg
 status=$?
 
 $copy_from_ctan && rm -rf $raw/$pkg

Modified: trunk/Master/tlpkg/bin/tl-update-lmtx-bin
===================================================================
--- trunk/Master/tlpkg/bin/tl-update-lmtx-bin	2025-03-01 23:12:04 UTC (rev 74381)
+++ trunk/Master/tlpkg/bin/tl-update-lmtx-bin	2025-03-01 23:17:26 UTC (rev 74382)
@@ -8,7 +8,7 @@
 Master=`cd $mydir/../.. && pwd`
 test -z "$Master" && exit 1
 
-cg=https://build.contextgarden.net/dl/luametatex/main
+cg=https://build.contextgarden.net/dl/luametatex/work
 
 for cgplat in  \
   aarch64-linux \

Modified: trunk/Master/tlpkg/libexec/place
===================================================================
--- trunk/Master/tlpkg/libexec/place	2025-03-01 23:12:04 UTC (rev 74381)
+++ trunk/Master/tlpkg/libexec/place	2025-03-01 23:17:26 UTC (rev 74382)
@@ -26,15 +26,18 @@
 my $chicken = 0;
 my $opt_contrib;
 my $opt_mode = "svn";
+my $opt_final_svn_update = 1;
 exit 2 unless Getopt::Long::GetOptions (
-  "n" => \$chicken,
+  "n"	      => \$chicken,
   "contrib=s" => \$opt_contrib,
   "mode=s"    => \$opt_mode,
+  "final-svn-update!" => \$opt_final_svn_update,
 );
 
 print "place: chicken mode = $chicken\n";
+print "place: final: $opt_final_svn_update\n";
 
-die "usage: $0 PKGNAME\n" unless @ARGV == 1;
+die "usage: $0 [OPT]... PKGNAME (ustl)\n" unless @ARGV == 1;
 $package = $ARGV[0];
 # $::opt_verbosity = 3;  # debug tlpdb reading
 
@@ -265,7 +268,7 @@
 
 # Always run svn update, even without --place.  This can help a worker
 # detect that a package update has already been done by someone else.
-if ($opt_mode eq "svn") {
+if ($opt_mode eq "svn" && $opt_final_svn_update) {
   print ("\nsvn status of those directories:\n");
   system ("svn status `sort -u $dirlist_file`");
   print ("\nsvn update of those directories:\n");



More information about the tex-live-commits mailing list.