texlive[52707] Master/tlpkg/bin: tl-update-nsis: can't remove tlpobj/

commits+karl at tug.org commits+karl at tug.org
Sat Nov 9 19:08:58 CET 2019


Revision: 52707
          http://tug.org/svn/texlive?view=revision&revision=52707
Author:   karl
Date:     2019-11-09 19:08:58 +0100 (Sat, 09 Nov 2019)
Log Message:
-----------
tl-update-nsis: can't remove tlpobj/ dir here.
tl-update-tlcritical: remove it here instead, after running makensis.
tltestnet: new --rebuild option to update test repository.

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tl-update-nsis
    trunk/Master/tlpkg/bin/tl-update-tlcritical
    trunk/Master/tlpkg/bin/tltestnet

Modified: trunk/Master/tlpkg/bin/tl-update-nsis
===================================================================
--- trunk/Master/tlpkg/bin/tl-update-nsis	2019-11-09 17:42:02 UTC (rev 52706)
+++ trunk/Master/tlpkg/bin/tl-update-nsis	2019-11-09 18:08:58 UTC (rev 52707)
@@ -46,14 +46,11 @@
   push(@allfiles, $texliveinfra->all_files);
   push(@allfiles, $texliveinfraw32->all_files) if defined $texliveinfraw32;
   
-  # create the tlpobj files, but if we have to create the tlpobj/ dir,
-  # don't leave it around after.
+  # create the tlpobj files, and directory if necessary.
   my $tlpobjdir = "$InfraLocation/tlpobj";
   my $abs_tlpobjdir = "$Master/$tlpobjdir";
-  my $rm_abs_tlpobjdir = 0;
   if (! -d $abs_tlpobjdir) {
     &TeXLive::TLUtils::mkdirhier($abs_tlpobjdir);
-    $rm_abs_tlpobjdir = 1;
   }
   my $rev = 0; # get the highest rev of all our packages
   for my $p ($texliveinfra, $texliveinfraw32) {
@@ -69,11 +66,6 @@
     }
   }
 
-  # remove the tlpobj/ dir if we created it.
-  if ($rm_abs_tlpobjdir) {
-    TeXLive::TLUtils::rmtree($abs_tlpobjdir);
-  }
-  
   my %dirtofiles;
   for my $f (@allfiles) {
     if ($f !~ m!/!) {
@@ -177,6 +169,9 @@
 contains the tlmgr-related infrastructure files.
 L<http://tug.org/texlive/tlmgr.html> explains more.
 
+If necessary, this creates a C<.../tlpkg/tlpobj/> subdirectory in the
+current hierarchy for C<makensis> to read (so it is not removed).
+
 This is invoked by the C<tl-update-tlcritical> script, along with the
 sibling C<tl-makeself-from-tlnet> which creates a similar disaster
 recovery executable for Unix.

Modified: trunk/Master/tlpkg/bin/tl-update-tlcritical
===================================================================
--- trunk/Master/tlpkg/bin/tl-update-tlcritical	2019-11-09 17:42:02 UTC (rev 52706)
+++ trunk/Master/tlpkg/bin/tl-update-tlcritical	2019-11-09 18:08:58 UTC (rev 52707)
@@ -98,9 +98,21 @@
 
 # update the Windows updater executable.
 echo "$0: running tl-update-nsis... (logfile: $TMPDIR/makensis.log)"
+#
+# we have to remove the tlpobj subdir ourselves, since it's created
+# by tl-update-nsis, but read by makensis. (But if it already exists,
+# don't remove it.)
+tlpobj=$master/tlpkg/tlpobj
+if test -d "$tlpobj"; then
+  keep_tlpobj=true
+else
+  keep_tlpobj=false
+fi
+#
 tl-update-nsis >$TMPDIR/updater.nsi
 makensis $TMPDIR/updater.nsi >$TMPDIR/makensis.log
 rm -f $TMPDIR/updater.nsi
+$keep_tlpobj || rm -rf $tlpobj
 do_updater exe
 
 echo $tlcrit:

Modified: trunk/Master/tlpkg/bin/tltestnet
===================================================================
--- trunk/Master/tlpkg/bin/tltestnet	2019-11-09 17:42:02 UTC (rev 52706)
+++ trunk/Master/tlpkg/bin/tltestnet	2019-11-09 18:08:58 UTC (rev 52707)
@@ -46,7 +46,14 @@
   $thisrel/install-tl $pro || exit 1 # make throwaway test install
   exit $?
 
+elif test "x$1" = x--rebuild; then
+  # update test repository. Do -s first to put code in place, and -S after.
+  destdir=/home/ftp/texlive/test-tlnet
+  tl-update-tlnet --critical --scheme infraonly --dest $destdir
+  tl-update-tlcritical --tlcrit $destdir --no-containers
+
 elif test "x$1" = x-u || test "x$1" = x--all || test "x$1" = x--self; then
+  # update installations.
   if test "x$1" = x-u || test "x$1" = x--all; then
     uarg=--all
   elif test "x$1" = x--self; then



More information about the tex-live-commits mailing list