Hello community, here is the log from the commit of package qnapi for openSUSE:Factory checked in at 2015-11-02 12:55:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qnapi (Old) and /work/SRC/openSUSE:Factory/.qnapi.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qnapi" Changes: -------- --- /work/SRC/openSUSE:Factory/qnapi/qnapi.changes 2015-09-08 17:49:00.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.qnapi.new/qnapi.changes 2015-11-02 12:55:28.000000000 +0100 @@ -1,0 +2,5 @@ +Sat Oct 31 19:46:14 UTC 2015 - [email protected] + +- Add qnapi-napisy24.pl-skip-.url.patch: fix napisy24.pl plugin. + +------------------------------------------------------------------- New: ---- qnapi-napisy24.pl-skip-.url.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qnapi.spec ++++++ --- /var/tmp/diff_new_pack.FaVZW7/_old 2015-11-02 12:55:29.000000000 +0100 +++ /var/tmp/diff_new_pack.FaVZW7/_new 2015-11-02 12:55:29.000000000 +0100 @@ -15,19 +15,22 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: qnapi Version: 0.1.9 Release: 0 Summary: A NapiProjekt client -Summary(pl): Klient NapiProjekt License: GPL-2.0+ Group: Productivity/Multimedia/Other +Summary(pl): Klient NapiProjekt Url: http://qnapi.github.io/ Source0: https://github.com/QNapi/qnapi/releases/download/%{version}/%{name}-%{version}.tar.gz # PATCH-FIX-UPSTREAM -- fix license heaaders -- Piotr Krzeminski <[email protected]> Patch0: 0001-fix-license-headers-in-source-files.patch # PATCH-FIX-UPSTREAM -- install icons in correct paths -- Mariusz Fik <[email protected]> Patch1: fix-icons-paths.patch +# PATCH-FIX-UPSTREAM -- fix napisy24.pl plugin -- Piotr Krzeminski <[email protected]> +Patch2: qnapi-napisy24.pl-skip-.url.patch BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: update-desktop-files @@ -54,6 +57,7 @@ %setup -q %patch0 -p1 %patch1 +%patch2 ### Fix paths specific for openSUSE sed -i 's|doc.path = $${INSTALL_PREFIX}/share/doc/$${TARGET}|doc.path = $${INSTALL_PREFIX}/share/doc/packages/$${TARGET}|' qnapi.pro @@ -70,7 +74,6 @@ install -m 644 -D doc/qnapi-download.desktop %{buildroot}%{_datadir}/kservices5/ServiceMenus/qnapi-download.desktop install -m 644 -D doc/qnapi-scan.desktop %{buildroot}%{_datadir}/kservices5/ServiceMenus/qnapi-scan.desktop - ### Fix for "wrong-file-end-of-line-encoding" doc/ChangeLog file sed -i 's/\r//' doc/ChangeLog ++++++ qnapi-napisy24.pl-skip-.url.patch ++++++ Index: src/engines/qnapisy24engine.cpp =================================================================== --- src/engines/qnapisy24engine.cpp.orig +++ src/engines/qnapisy24engine.cpp @@ -427,6 +427,7 @@ bool QNapisy24Engine::unpack() return false; QString resp = QByteArray(p7zip.readAll()); + #ifdef Q_OS_WIN QRegExp r("\r\nPath = ([^\r\n]*)\r\n"); #else @@ -434,17 +435,32 @@ bool QNapisy24Engine::unpack() #endif r.setPatternSyntax(QRegExp::RegExp2); - if (r.lastIndexIn(resp) == -1) + QStringList pathMatches; + int offset = 0; + + while((offset = r.indexIn(resp, offset)) != -1) + { + QString filePath = r.cap(1); + + if(filePath != tmpPackedFile && !filePath.endsWith(".url")) + { + pathMatches << filePath; + } + + offset += r.matchedLength(); + } + + if(pathMatches.isEmpty()) return false; - QString subFileName = r.cap(1); + QString subFileName = pathMatches.first(); subtitlesTmp = tmpPath + "/" + subFileName; if(QFile::exists(subtitlesTmp)) QFile::remove(subtitlesTmp); QStringList args; - args << "e" << "-y" << ("-o" + tmpPath) << tmpPackedFile; + args << "e" << "-y" << ("-o" + tmpPath) << tmpPackedFile << subFileName; p7zip.start(p7zipPath, args);
