[latex3-commits] [latex3/latex2e] develop: avoid writing tex for #1412 (02b17b1f)

github at latex-project.org github at latex-project.org
Sun Sep 15 20:27:07 CEST 2024


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/02b17b1f1ea56934369d9bcf28dc5b5bc4a21746

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

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

    avoid writing tex for #1412


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

02b17b1f1ea56934369d9bcf28dc5b5bc4a21746
 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.