Am Freitag, 19. Januar 2018 um 19:04:12, schrieb Guenter Milde 
<mi...@users.sf.net>
> Dear Kornel, dear LyX developers,
> 
> I found the problem and will provide a patch.
> 
> See below for details.
> 
> On 2018-01-19, Kornel Benko wrote:
> > Am Freitag, 19. Januar 2018 um 09:56:04, schrieb Kornel Benko 
> > <kor...@lyx.org>
> >> Am Donnerstag, 18. Januar 2018 um 21:04:04, schrieb Guenter Milde 
> >> <mi...@users.sf.net>
> >> > So yes, there is a difference between the lyx files
> >> > UserGuide.16.lyx and UserGuide.16.16.lyx.
> >> > 
> >> > How are these files generated?
> >> > 
> 
> >>    #lyx -E pdf2 UserGuide.16.lyx UserGuide.lyx
> >>    #lyx -E pdf2 UserGuide.16.16.lyx UserGuide.16.lyx
> >>    #diff UserGuide.16.lyx UserGuide.16.16.lyx
> 
> > Sorry, I meant
> >     #lyx -E lyx16x UserGuide.16.lyx UserGuide.lyx
> >     #lyx -E lyx16x UserGuide.16.16.lyx UserGuide.16.lyx
> 
> >> > Does one of them need updating?
> 
> >> No.
> 
> Are they tested for equivalence? 
> If yes, why is export/doc/UserGuide_lyx21 *not* failing despite almost the
> same differences between UserGuide.21.lyx and UserGuide.21.21.lyx?
> 
> 
> What else could lead to failure?
> 
> The log file says:
> 
> ...
> -- Executing /usr/local/src/lyxtest/bin/lyx2.4 -userdir 
> "/usr/local/src/lyxtest/Testing/.lyx" -E lyx16x UserGuide.16.lyx 
> "/usr/local/src/lyx/lib/doc/UserGuide.lyx"
> -- This implicitly checks load of /usr/local/src/lyx/lib/doc/UserGuide.lyx
> -- Expected result file "UserGuide.16.lyx" exists
> ...
> -- MD5SUM of "UserGuide.16.lyx" is 85d3da7bf3897ca73ad95d0bced0409f
> -- Executing /usr/local/src/lyxtest/bin/lyx2.4 -userdir 
> "/usr/local/src/lyxtest/Testing/.lyx" -E lyx16x UserGuide.16.16.lyx 
> "UserGuide.16.lyx"
> -- This implicitly checks load of UserGuide.16.lyx
> -- Expected result file "UserGuide.16.16.lyx" exists
> ...
> -- MD5SUM of "UserGuide.16.16.lyx" is 97f1a1cdf3c2875f8183e215a8ee98fd
> -- Executing /usr/local/src/lyxtest/bin/lyx2.4 -userdir 
> "/usr/local/src/lyxtest/Testing/.lyx" -E lyx16x UserGuide.16.16.16.lyx 
> "UserGuide.16.16.lyx"
> -- This implicitly checks load of UserGuide.16.16.lyx
> -- Exporting UserGuide.lyx to lyx16x
> CMake Error at /usr/local/src/lyx/development/autotests/export.cmake:205 
> (message):
>   Export failed
> 
> 
> It seems the conversion went fine 2 times but fails the third time. 
> 
> How many conversions are done?

Up to 5, ATM.
The loop stops if the result equals the previous version.
See also comment for commit a10b6713178552371f72795ae60e54ceb6a0914b
(There are many messages with subject containing 'lyx2lyx roundtrip fails with'
in the lyx-devel list, so this is not the first time we found errors this way)

> (In my autotests/out-home/ dir are files
> like "MissingEndTagDiv.22.22.22.22.22.lyx")
> 
> 
> I tried UserGuide.16.16.lyx with LyX2.4.dev:
> 
> compiling fails with:
> 
>  ! LaTeX Error: Command \b@xcite already defined.
>                Or name \end... illegal, see p.192 of the manual.
> 
>  (because some preamble code is added a second time).
>  
> And exporting to 1.6 fails with
> 
>  lyx-en UserGuide.16.16.lyx 
> Warning: An error ocurred in 480, <function revert_dashes at 0x7f5ee25949b0>
> Traceback (most recent call last):
>   File "/usr/local/src/lyx/lib/lyx2lyx/lyx2lyx", line 96, in <module>
>     main()
>   File "/usr/local/src/lyx/lib/lyx2lyx/lyx2lyx", line 90, in main
>     doc.convert()
>   File "/usr/local/src/lyx/lib/lyx2lyx/LyX.py", line 679, in convert
>     conv(self)
>   File "/usr/local/src/lyx/lib/lyx2lyx/lyx_2_2.py", line 711, in revert_dashes
>     document.preamble[i+1] == r'\renewcommand{\textendash}{--}' and
> IndexError: list index out of range
> support/Systemcall.cpp (314): Systemcall: 'python -tt 
> "/usr/local/src/lyx/lib/lyx2lyx/lyx2lyx" -V 1.6 -o "UserGuide.16.16.16.lyx" 
> "UserGuide.16.16.lyx"' finished with exit code 1
> Error: Cannot convert file
> ----------------------------------------
> An error occurred while running:
> python -tt $$s/lyx2lyx/lyx2lyx -V 1.6 -o "UserGuide.16.16.16.lyx"
> "UserGuide.16.16.lyx"

And that is the culprit.

> 
> When rewriting the preamble-removal code for better readability, I missed to
> make it failproof. This will be fixed soon.
> 
> Günter

        Kornel

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to