>>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
Lars> "Bo Peng" <[EMAIL PROTECTED]> writes: | Hi, Lars,
Lars> |
Lars> | The following patch is needed to prevent lib/configure.py from
Lars> hanging | when the latex test fails (latex will wait for user
Lars> interaction). It | is in the trunk now, OK for 1.4.x?
Lars> J-M's domain, but I cannot see why not.
I see it has been applied to 1.4, but I do not like this code much.
I think it is more portable (and much simpler) to use the \nonstopmode
macro at the beginning of the file.
Also, at a time when everybody wants to use only almost-prerelease
software in LyX, code like
os.write(fd, r'''
\documentstyle{article}
\begin{document}\end{document}
''')
has a rather 1980's taste :) More seriously, initializing the
whole latex machinery takes time.
I am not in a position to test anything, but I'd propose a patch like
the following. Enrico, could you check it?
JMarc
Index: lib/configure.py
===================================================================
--- lib/configure.py (revision 14311)
+++ lib/configure.py (working copy)
@@ -85,17 +85,16 @@
from tempfile import mkstemp
fd, tmpfname = mkstemp(suffix='.ltx', dir='/tmp')
os.write(fd, r'''
-\documentstyle{article}
-\begin{document}\end{document}
+\relax
''')
os.close(fd)
inpname = cmdOutput('cygpath -m ' + tmpfname)
# a wrapper file
wfd, wtmpfname = mkstemp(suffix='.ltx', dir='/tmp')
wtmpfname = cmdOutput('cygpath -m ' + wtmpfname)
- os.write(wfd, r'\input{' + inpname + '}' )
+ os.write(wfd, r'\nonstopmode\input{' + inpname + '}' )
os.close(wfd)
- if cmdOutput('latex -interaction=nonstopmode %s' % wtmpfname).find('Error') != -1:
+ if cmdOutput('latex %s' % wtmpfname).find('Error') != -1:
print "configure: TeX engine needs posix-style paths in latex files"
windows_style_tex_paths = 'false'
else: