On Fri, Mar 07, 2003 at 08:49:50PM +0000, Angus Leeming wrote: > >> Modified files: > >> lyx-devel/src/: DepTable.C DepTable.h LaTeX.C ChangeLog > >> > >> Log message: > >> Fix a bug where the DVI file was not updated due to an old format .dep > >> file. > > > > Note that the bug occurs when use_tempdir = false. > > Could you post the patch since viewcvs isn't working at the moment? > > > Now this bug is really CRITICAL. > > The patch must be ported to 1.3.1cvs.
Here is the patch against 1.3.1cvs
Index: LaTeX.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LaTeX.C,v retrieving revision 1.74 diff -u -p -r1.74 LaTeX.C --- LaTeX.C 6 Jan 2003 14:02:20 -0000 1.74 +++ LaTeX.C 7 Mar 2003 21:08:08 -0000 @@ -169,7 +169,10 @@ int LaTeX::run(TeXErrors & terr, LyXFunc if (had_depfile) { lyxerr[Debug::DEPEND] << "Dependency file exists" << endl; // Read the dep file: - head.read(depfile); + had_depfile = head.read(depfile); + } + + if (had_depfile) { // Update the checksums head.update(); // Can't just check if anything has changed because it might have aborted @@ -190,7 +193,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc run_bibtex = true; } else lyxerr[Debug::DEPEND] - << "Dependency file does not exist" << endl; + << "Dependency file does not exist, or has wrong format" << endl; /// We scan the aux file even when had_depfile = false, /// because we can run pdflatex on the file after running latex on it, Index: DepTable.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/DepTable.C,v retrieving revision 1.31 diff -u -p -r1.31 DepTable.C --- DepTable.C 8 Jan 2003 09:54:18 -0000 1.31 +++ DepTable.C 7 Mar 2003 21:08:08 -0000 @@ -237,7 +237,7 @@ void DepTable::write(string const & f) c } -void DepTable::read(string const & f) +bool DepTable::read(string const & f) { ifstream ifs(f.c_str()); string nome; @@ -255,4 +255,5 @@ void DepTable::read(string const & f) } deplist[nome] = di; } + return deplist.size(); } Index: DepTable.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/DepTable.h,v retrieving revision 1.14 diff -u -p -r1.14 DepTable.h --- DepTable.h 21 Mar 2002 17:25:07 -0000 1.14 +++ DepTable.h 7 Mar 2003 21:08:08 -0000 @@ -36,8 +36,8 @@ public: /// void write(string const & f) const; - /// - void read(string const & f); + /// returns true if dep file was read successfully + bool read(string const & f); /// returns true if any of the files has changed bool sumchange() const; /// return true if fil has changed.