On Tue, Oct 15, 2002 at 12:20:57PM +0200, Jean-Marc Lasgouttes wrote: > Dekel> The attached patch fixes this. > > Could you describe what the new logic is? I have problems to make > sense of it by looking at the patch (I know I should apply it, sorry)
If the user don't have the file ~/.lyx/lyxrc.defaults, then it means that the user hasn't installed any local program, or in other word, the user environment is the same as the global environment (*). Therefore, the user doesn't need to run the configure script when a new version of LyX is installed, as LYXLIBDIR/lyxrc.defaults will be updated in the installation. Therefore, we do an automatic update only if the file ~/.lyx/lyxrc.defaults exists, and this file is older than LYXLIBDIR/configure. (*) This is not accurate, because the user might have a local packages.lst or textclass.lst which is different than the global one, so the correct logic is to check if one of these files exists, and if the answer is yes then compare the date to the date of the configure script. Another option is to make the configure script generate a file ~/.lyx/local_changes if (and only if) the local environment is different than the global environment, and then only this file needs to be checked. > Actually, the reason why I delayed my answer is that what I would like > to do is to redirect the output of configure to a file 'config.log' in > .lyx and do the time check on this file. This would allow to have the > information on what happened handy at any time. However, I did not > find time to do this. But if the user environment is the same as the global environment (no lyxrc.defaults/packages.lst/textclass.lst) this change will cause an unneeded configure run each time a new version of LyX is installed (because the log file always exists). Creating ~/.lyx/local_changes as suggested above might be a better option.