[latex3-commits] [latex3/latex2e] gh1412: avoid writing tex for #1412 (d3ceef29)

github at latex-project.org github at latex-project.org
Thu Sep 12 18:26:46 CEST 2024


Repository : https://github.com/latex3/latex2e
On branch  : gh1412
Link       : https://github.com/latex3/latex2e/commit/d3ceef29684ca5059ef89efb61715f0226a3c529

>---------------------------------------------------------------

commit d3ceef29684ca5059ef89efb61715f0226a3c529
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Thu Sep 12 17:26:46 2024 +0100

    avoid writing tex for #1412


>---------------------------------------------------------------

d3ceef29684ca5059ef89efb61715f0226a3c529
 required/tools/build.lua | 25 +++++++++++++++++++++++++
 required/tools/tools.ins |  8 +++-----
 2 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/required/tools/build.lua b/required/tools/build.lua
index b8081efb..7407672a 100644
--- a/required/tools/build.lua
+++ b/required/tools/build.lua
@@ -38,3 +38,28 @@ checkconfigs = {"build","config-TU","config-legacy","config-search"}
 
 -- Load the common settings for the LaTeX2e repo
 dofile (maindir .. "/build-config.lua")
+
+-- special code to handle .tex
+
+function unpack(sources, sourcedirs)
+  local errorlevel = dep_install(unpackdeps)
+  if errorlevel ~= 0 then
+    return errorlevel
+  end
+  errorlevel = bundleunpack(sourcedirs, sources)
+  if errorlevel ~= 0 then
+    return errorlevel
+  end
+  texio.write(" * Renaming rename-to-empty-base.tex to .tex")
+  errorlevel = ren(unpackdir,"rename-to-empty-base.tex",".tex")
+  if errorlevel ~= 0 then
+    return errorlevel
+  end
+  for _,i in ipairs(installfiles) do
+    errorlevel = cp(i, unpackdir, localdir)
+    if errorlevel ~= 0 then
+      return errorlevel
+    end
+  end
+  return 0
+end
diff --git a/required/tools/tools.ins b/required/tools/tools.ins
index 8687d49d..53956f33 100644
--- a/required/tools/tools.ins
+++ b/required/tools/tools.ins
@@ -213,12 +213,10 @@ given in the file `manifest.txt'.
 
 \Msg{}
 \Msg{* Finally trying to make a file `.tex'.}
-\Msg{* (Placed at the end of this run, as this}
-\Msg{*  may fail on some operating systems.)}
+\Msg{* TeX may be blocked from writing .tex so writing rename-to-empty-base.tex}
+\Msg{* Rename that file to .tex after the docstrip generation}
 
-\let\oldopenout\openout
-\def\openout{\batchmode\immediate\oldopenout}
 
-\generate{\file{.tex}{\from{fileerr.dtx}{return}}}
+\generate{\file{rename-to-empty-base.tex}{\from{fileerr.dtx}{return}}}
 
 \endbatchfile





More information about the latex3-commits mailing list.