Re: Review Request 116604: Allow directories with . as output for meinproc
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/116604/#review52419 --- This review has been submitted with commit 4406199290ab5192c178929fbc56a272e2fa8d7b by Luigi Toscano to branch master. - Commit Hook On March 5, 2014, 1:06 a.m., Luigi Toscano wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/116604/ --- (Updated March 5, 2014, 1:06 a.m.) Review request for Documentation, KDE Frameworks, kdelibs, and Aleix Pol Gonzalez. Bugs: 246755 https://bugs.kde.org/show_bug.cgi?id=246755 Repository: kdoctools Description --- The outputFile parameter is not used by the stylesheets, so don't pass it. If a directory starts with ., it is interpreted in a wrong way by libxslt with an error like: --- XPath error : Invalid expression /home/kde-devel/.cache5/khelpcenter/help/__home__kde- devel__kde__share__doc__HTML__en__kioslave__file__index.docbook ^ runtime error Evaluating user parameter outputFile failed --- This is an old issue, it was solved on windows by not compiling that code, but I suspect that the issue has been in UNIX systems too for a long time. Another way to solve the bug is quoting the value of the parameter with '...', replacing: params.append(qstrdup(parser.value(QStringLiteral(output)).toLocal8Bit().constData())); with something like QString quotedOutput = ' + parser.value(QStringLiteral(output)) + '; params.append(qstrdup(quotedOutput.toLocal8Bit().constData())); but anyway in this case the name of output file is not used, or I can't find any occurrence in the stylesheets. The stylesheet is applied and the name of the file is used only after to write the generated XML (see tranform() function). A similar patch can be applied to kdelibs/kdoctools too (same codepath). Diffs - src/meinproc.cpp 95adcea Diff: https://git.reviewboard.kde.org/r/116604/diff/ Testing --- Run meinproc5 (and 4) with -o /something/with/a/.dotdir/myfile.txt (the directory must exist), no error anymore and the file is generated. Thanks, Luigi Toscano
Re: Review Request 116604: Allow directories with . as output for meinproc
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/116604/ --- (Updated March 8, 2014, 11:55 p.m.) Status -- This change has been marked as submitted. Review request for Documentation, KDE Frameworks, kdelibs, and Aleix Pol Gonzalez. Bugs: 246755 https://bugs.kde.org/show_bug.cgi?id=246755 Repository: kdoctools Description --- The outputFile parameter is not used by the stylesheets, so don't pass it. If a directory starts with ., it is interpreted in a wrong way by libxslt with an error like: --- XPath error : Invalid expression /home/kde-devel/.cache5/khelpcenter/help/__home__kde- devel__kde__share__doc__HTML__en__kioslave__file__index.docbook ^ runtime error Evaluating user parameter outputFile failed --- This is an old issue, it was solved on windows by not compiling that code, but I suspect that the issue has been in UNIX systems too for a long time. Another way to solve the bug is quoting the value of the parameter with '...', replacing: params.append(qstrdup(parser.value(QStringLiteral(output)).toLocal8Bit().constData())); with something like QString quotedOutput = ' + parser.value(QStringLiteral(output)) + '; params.append(qstrdup(quotedOutput.toLocal8Bit().constData())); but anyway in this case the name of output file is not used, or I can't find any occurrence in the stylesheets. The stylesheet is applied and the name of the file is used only after to write the generated XML (see tranform() function). A similar patch can be applied to kdelibs/kdoctools too (same codepath). Diffs - src/meinproc.cpp 95adcea Diff: https://git.reviewboard.kde.org/r/116604/diff/ Testing --- Run meinproc5 (and 4) with -o /something/with/a/.dotdir/myfile.txt (the directory must exist), no error anymore and the file is generated. Thanks, Luigi Toscano
Re: Review Request 116604: Allow directories with . as output for meinproc
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/116604/#review52347 --- Ship it! Thanks - Burkhard Lück On March 5, 2014, 1:06 a.m., Luigi Toscano wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/116604/ --- (Updated March 5, 2014, 1:06 a.m.) Review request for Documentation, KDE Frameworks, kdelibs, and Aleix Pol Gonzalez. Bugs: 246755 https://bugs.kde.org/show_bug.cgi?id=246755 Repository: kdoctools Description --- The outputFile parameter is not used by the stylesheets, so don't pass it. If a directory starts with ., it is interpreted in a wrong way by libxslt with an error like: --- XPath error : Invalid expression /home/kde-devel/.cache5/khelpcenter/help/__home__kde- devel__kde__share__doc__HTML__en__kioslave__file__index.docbook ^ runtime error Evaluating user parameter outputFile failed --- This is an old issue, it was solved on windows by not compiling that code, but I suspect that the issue has been in UNIX systems too for a long time. Another way to solve the bug is quoting the value of the parameter with '...', replacing: params.append(qstrdup(parser.value(QStringLiteral(output)).toLocal8Bit().constData())); with something like QString quotedOutput = ' + parser.value(QStringLiteral(output)) + '; params.append(qstrdup(quotedOutput.toLocal8Bit().constData())); but anyway in this case the name of output file is not used, or I can't find any occurrence in the stylesheets. The stylesheet is applied and the name of the file is used only after to write the generated XML (see tranform() function). A similar patch can be applied to kdelibs/kdoctools too (same codepath). Diffs - src/meinproc.cpp 95adcea Diff: https://git.reviewboard.kde.org/r/116604/diff/ Testing --- Run meinproc5 (and 4) with -o /something/with/a/.dotdir/myfile.txt (the directory must exist), no error anymore and the file is generated. Thanks, Luigi Toscano
Re: Review Request 116604: Allow directories with . as output for meinproc
On March 5, 2014, 3:36 p.m., Burkhard Lück wrote: src/meinproc.cpp, lines 170-179 https://git.reviewboard.kde.org/r/116604/diff/1/?file=252003#file252003line170 How does this affect this code in KHelpcenter: kde-runtime/khelpcenter/glossary.cpp:149:KProcess *meinproc = new KProcess; kde-runtime/khelpcenter/glossary.cpp:153:*meinproc KStandardDirs::locate( exe, QLatin1String( meinproc4 ) ); kde-runtime/khelpcenter/glossary.cpp:154:*meinproc QLatin1String( --output ) m_cacheFile; kde-runtime/khelpcenter/glossary.cpp:155:*meinproc QLatin1String( --stylesheet ) kde-runtime/khelpcenter/glossary.cpp:157:*meinproc m_sourceFile; kde-runtime/khelpcenter/glossary.cpp:176:KProcess *meinproc = static_castKProcess *(sender()); kde-runtime/khelpcenter/toc.cpp:148:KProcess *meinproc = new KProcess; kde-runtime/khelpcenter/toc.cpp:152:*meinproc KStandardDirs::locate(exe, meinproc4); kde-runtime/khelpcenter/toc.cpp:153:*meinproc --stylesheet KStandardDirs::locate( data, khelpcenter/table-of-contents.xslt ); kde-runtime/khelpcenter/toc.cpp:154:*meinproc --output m_cacheFile; kde-runtime/khelpcenter/toc.cpp:155:*meinproc m_sourceFile; kde-runtime/khelpcenter/toc.cpp:172:KProcess *meinproc = static_castKProcess *(sender()); About the issue with dot in Path see also http://lists.kde.org/?l=kde-doc-englishm=127421104303628w=2 Yes, the bug is the one reported in that email. It has been filed as bug https://bugs.kde.org/show_bug.cgi?id=246755 (I set it in this RR). The problem was that the value was passed without quotes as parameter to the the function in libxslt. But on the other side it is not used, because the output of the stylesheet is stored in a string and then written in a file (see transform function in xslt.cpp), so it's pointless to pass it. - Luigi --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/116604/#review52091 --- On March 5, 2014, 1:06 a.m., Luigi Toscano wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/116604/ --- (Updated March 5, 2014, 1:06 a.m.) Review request for Documentation, KDE Frameworks, kdelibs, and Aleix Pol Gonzalez. Bugs: 246755 https://bugs.kde.org/show_bug.cgi?id=246755 Repository: kdoctools Description --- The outputFile parameter is not used by the stylesheets, so don't pass it. If a directory starts with ., it is interpreted in a wrong way by libxslt with an error like: --- XPath error : Invalid expression /home/kde-devel/.cache5/khelpcenter/help/__home__kde- devel__kde__share__doc__HTML__en__kioslave__file__index.docbook ^ runtime error Evaluating user parameter outputFile failed --- This is an old issue, it was solved on windows by not compiling that code, but I suspect that the issue has been in UNIX systems too for a long time. Another way to solve the bug is quoting the value of the parameter with '...', replacing: params.append(qstrdup(parser.value(QStringLiteral(output)).toLocal8Bit().constData())); with something like QString quotedOutput = ' + parser.value(QStringLiteral(output)) + '; params.append(qstrdup(quotedOutput.toLocal8Bit().constData())); but anyway in this case the name of output file is not used, or I can't find any occurrence in the stylesheets. The stylesheet is applied and the name of the file is used only after to write the generated XML (see tranform() function). A similar patch can be applied to kdelibs/kdoctools too (same codepath). Diffs - src/meinproc.cpp 95adcea Diff: https://git.reviewboard.kde.org/r/116604/diff/ Testing --- Run meinproc5 (and 4) with -o /something/with/a/.dotdir/myfile.txt (the directory must exist), no error anymore and the file is generated. Thanks, Luigi Toscano
Re: Review Request 116604: Allow directories with . as output for meinproc
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/116604/#review52091 --- src/meinproc.cpp https://git.reviewboard.kde.org/r/116604/#comment36985 How does this affect this code in KHelpcenter: kde-runtime/khelpcenter/glossary.cpp:149:KProcess *meinproc = new KProcess; kde-runtime/khelpcenter/glossary.cpp:153:*meinproc KStandardDirs::locate( exe, QLatin1String( meinproc4 ) ); kde-runtime/khelpcenter/glossary.cpp:154:*meinproc QLatin1String( --output ) m_cacheFile; kde-runtime/khelpcenter/glossary.cpp:155:*meinproc QLatin1String( --stylesheet ) kde-runtime/khelpcenter/glossary.cpp:157:*meinproc m_sourceFile; kde-runtime/khelpcenter/glossary.cpp:176:KProcess *meinproc = static_castKProcess *(sender()); kde-runtime/khelpcenter/toc.cpp:148:KProcess *meinproc = new KProcess; kde-runtime/khelpcenter/toc.cpp:152:*meinproc KStandardDirs::locate(exe, meinproc4); kde-runtime/khelpcenter/toc.cpp:153:*meinproc --stylesheet KStandardDirs::locate( data, khelpcenter/table-of-contents.xslt ); kde-runtime/khelpcenter/toc.cpp:154:*meinproc --output m_cacheFile; kde-runtime/khelpcenter/toc.cpp:155:*meinproc m_sourceFile; kde-runtime/khelpcenter/toc.cpp:172:KProcess *meinproc = static_castKProcess *(sender()); About the issue with dot in Path see also http://lists.kde.org/?l=kde-doc-englishm=127421104303628w=2 - Burkhard Lück On March 5, 2014, 1:06 a.m., Luigi Toscano wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/116604/ --- (Updated March 5, 2014, 1:06 a.m.) Review request for Documentation, KDE Frameworks, kdelibs, and Aleix Pol Gonzalez. Bugs: 246755 https://bugs.kde.org/show_bug.cgi?id=246755 Repository: kdoctools Description --- The outputFile parameter is not used by the stylesheets, so don't pass it. If a directory starts with ., it is interpreted in a wrong way by libxslt with an error like: --- XPath error : Invalid expression /home/kde-devel/.cache5/khelpcenter/help/__home__kde- devel__kde__share__doc__HTML__en__kioslave__file__index.docbook ^ runtime error Evaluating user parameter outputFile failed --- This is an old issue, it was solved on windows by not compiling that code, but I suspect that the issue has been in UNIX systems too for a long time. Another way to solve the bug is quoting the value of the parameter with '...', replacing: params.append(qstrdup(parser.value(QStringLiteral(output)).toLocal8Bit().constData())); with something like QString quotedOutput = ' + parser.value(QStringLiteral(output)) + '; params.append(qstrdup(quotedOutput.toLocal8Bit().constData())); but anyway in this case the name of output file is not used, or I can't find any occurrence in the stylesheets. The stylesheet is applied and the name of the file is used only after to write the generated XML (see tranform() function). A similar patch can be applied to kdelibs/kdoctools too (same codepath). Diffs - src/meinproc.cpp 95adcea Diff: https://git.reviewboard.kde.org/r/116604/diff/ Testing --- Run meinproc5 (and 4) with -o /something/with/a/.dotdir/myfile.txt (the directory must exist), no error anymore and the file is generated. Thanks, Luigi Toscano