Hi List,
we presumably discovered a bug in lualatex: When an output file is not
writable and the error message is waved through by simply pressing
enter, lualatex writes output into the input file, deleting all previous
content.
We observed this on a multi-user system with .aux files. Here, a minimal
example and steps to reproduce:
-- main.tex --
\documentclass{book}
\includeonly{%
kap-A,%
}
\begin{document}
\include{kap-A}
\end{document}
-- /main.tex --
-- kap-A.tex --
Some Text.
-- /kap-A.tex --
and then making the kap-A.aux file unwritable with
touch kap-A.aux
chmod u-rw kap-A.aux
With the next run of
lualatex main.tex
TeX throws an error:
! I can't write on file `kap-A.aux'.
\@include ...mmediate \openout \@partaux "#1.aux"
\immediate \write \@partau...
l.32 \include{kap-A}
Please type another output file name
If this is answerd with a simple press of <enter>, the content that is
supposed to go into the kap-A.aux file is instead written into the
kap-A.tex file, deleting its previous content!
When i asked about the issue in the tex.SE chat, Ulrike Fischer was able
to reproduce it with the following code by blocking the target pdf file
by opening it in Acrobat:
\documentclass{article}
\begin{document}
\newwrite \blub
\immediate \openout \blub "testout.pdf"
\immediate \write \blub {cde}
\end{document}
This seems to be a general issue with the write mechanism.
Ulrike also asked me to post the issue in the mailing list, so here we
areĀ :)
All the best!
--
Patrick 'Lupino' Schulz
Software Engineer
GutsMuthsstr. 29, 04177 Leipzig, Germany
Phone: +49 177 6877789
[email protected],www.lupino.org