On Thu, Aug 30, 2007 at 09:57:31AM -0500, Bo Peng wrote: > > Note that configure.py already has an option (--without-latex-config) > > to create a default textclass.lst file, so maybe a new option could be > > added to lyx such that on startup a reconfigure is forced by passing > > that option to configure.py. Once lyx is started, a normal reconfiguration > > could be attempted from within it. > > That is not an option. The reason why lyx has to run full configure.py > at start up (answering Abdel's question) is for command line use. I > heard from JMarc that some packagers install lyx and use it to convert > some .lyx files. In this case, it is inconvenient to run lyx first to > configure, and run lyx the second time to convert, especially when you > do not know if lyx has already been configured correctly.
I think that there is another option. ATM, lyx decides that a reconfiguration is needed when the timestamp of configure.py is newer than that of the .lst files. Why not adding the condition that they are also empty? See the attached. -- Enrico
Index: src/LyX.cpp =================================================================== --- src/LyX.cpp (revision 19915) +++ src/LyX.cpp (working copy) @@ -1100,7 +1100,7 @@ bool needsUpdate(string const & file) string const absfile = FileName(addName( package().user_support().absFilename(), file)).toFilesystemEncoding(); - return (! fs::exists(absfile)) + return (! fs::exists(absfile)) || fs::is_empty(absfile) || (fs::last_write_time(configure_script) > fs::last_write_time(absfile)); }