From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CE387139694 for ; Sat, 29 Apr 2017 11:58:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0AAF621C07D; Sat, 29 Apr 2017 11:57:53 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CEE2C21C07D for ; Sat, 29 Apr 2017 11:57:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D5E5C341774 for ; Sat, 29 Apr 2017 11:57:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7A2B1730C for ; Sat, 29 Apr 2017 11:57:50 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1493466981.25c13ec9aa6daad7f4a16f36de0264d2a4cd38aa.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kconfig/files/, kde-frameworks/kconfig/ X-VCS-Repository: repo/gentoo X-VCS-Files: kde-frameworks/kconfig/files/kconfig-5.33.0-relativePath.patch kde-frameworks/kconfig/kconfig-5.33.0-r1.ebuild X-VCS-Directories: kde-frameworks/kconfig/files/ kde-frameworks/kconfig/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 25c13ec9aa6daad7f4a16f36de0264d2a4cd38aa X-VCS-Branch: master Date: Sat, 29 Apr 2017 11:57:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 2a5c7238-7637-469f-823c-c745eee859ed X-Archives-Hash: bf57cca9539af0ee02ede7c66a85a71c commit: 25c13ec9aa6daad7f4a16f36de0264d2a4cd38aa Author: Andreas Sturmlechner gentoo org> AuthorDate: Thu Apr 27 18:50:05 2017 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat Apr 29 11:56:21 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25c13ec9 kde-frameworks/kconfig: Add fix for relativePath Package-Manager: Portage-2.3.3, Repoman-2.3.1 .../files/kconfig-5.33.0-relativePath.patch | 88 ++++++++++++++++++++++ kde-frameworks/kconfig/kconfig-5.33.0-r1.ebuild | 28 +++++++ 2 files changed, 116 insertions(+) diff --git a/kde-frameworks/kconfig/files/kconfig-5.33.0-relativePath.patch b/kde-frameworks/kconfig/files/kconfig-5.33.0-relativePath.patch new file mode 100644 index 00000000000..80bffc15a29 --- /dev/null +++ b/kde-frameworks/kconfig/files/kconfig-5.33.0-relativePath.patch @@ -0,0 +1,88 @@ +commit 3ad00c4e56eb9fe6ea7386f8ca1db6e15c26ac11 +Author: Wolfgang Bauer +Date: Tue Apr 25 23:37:11 2017 +0200 + + Fix relativePath calculation in KDesktopFile::locateLocal() + + The "dir" and "path" variables were obviously swapped here by mistake. + This resulted in the relativePath always being empty, and made the + function return "~/.local/share/" (or "~/.config/") instead of the + correct path. + + BUG: 345100 + FIXED-IN: 5.34.0 + Differential Revision: https://phabricator.kde.org/D5502 + +diff --git a/autotests/kdesktopfiletest.cpp b/autotests/kdesktopfiletest.cpp +index 393a6a0..a046196 100644 +--- a/autotests/kdesktopfiletest.cpp ++++ b/autotests/kdesktopfiletest.cpp +@@ -255,3 +255,34 @@ void KDesktopFileTest::testTryExecWithAuthorizeAction() + QVERIFY(!desktopFile.tryExec()); + } + } ++ ++void KDesktopFileTest::testLocateLocal_data() ++{ ++ QString systemConfigLocation = QStandardPaths::standardLocations(QStandardPaths::GenericConfigLocation).last(); ++ QString writableConfigLocation = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation); ++ QString systemDataLocation = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation).last(); ++ QString writableDataLocation = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation); ++ ++ QTest::addColumn("path"); ++ QTest::addColumn("result"); ++ ++ QTest::newRow("configLocation, system-wide") << systemConfigLocation + "/test.desktop" << writableConfigLocation + "/test.desktop"; ++ QTest::newRow("autostart, system-wide") << systemConfigLocation + "/autostart/test.desktop" << writableConfigLocation + "/autostart/test.desktop"; ++ QTest::newRow("dataLocation, system-wide") << systemDataLocation + "/test.desktop" << writableDataLocation + "/test.desktop"; ++ QTest::newRow("applications, system-wide") << systemDataLocation + "/applications/test.desktop" << writableDataLocation + "/applications/test.desktop"; ++ QTest::newRow("desktop-directories, system-wide") << systemDataLocation + "/desktop-directories/test.directory" << writableDataLocation + "/desktop-directories/test.directory"; ++ QTest::newRow("configLocation, writable") << writableConfigLocation + "/test.desktop" << writableConfigLocation + "/test.desktop"; ++ QTest::newRow("autostart, writable") << writableConfigLocation + "/autostart/test.desktop" << writableConfigLocation + "/autostart/test.desktop"; ++ QTest::newRow("dataLocation, writable") << writableDataLocation + "/test.desktop" << writableDataLocation + "/test.desktop"; ++ QTest::newRow("applications, writable") << writableDataLocation + "/applications/test.desktop" << writableDataLocation + "/applications/test.desktop"; ++ QTest::newRow("desktop-directories, writable") << writableDataLocation + "/desktop-directories/test.directory" << writableDataLocation + "/desktop-directories/test.directory"; ++ QTest::newRow("unknown location") << "/test.desktop" << writableDataLocation + "/test.desktop"; ++} ++ ++void KDesktopFileTest::testLocateLocal() ++{ ++ QFETCH(QString, path); ++ QFETCH(QString, result); ++ ++ QCOMPARE(KDesktopFile::locateLocal(path), result); ++} +diff --git a/autotests/kdesktopfiletest.h b/autotests/kdesktopfiletest.h +index eb0bd1d..ed6679a 100644 +--- a/autotests/kdesktopfiletest.h ++++ b/autotests/kdesktopfiletest.h +@@ -34,6 +34,8 @@ private Q_SLOTS: + void testActionGroup(); + void testIsAuthorizedDesktopFile(); + void testTryExecWithAuthorizeAction(); ++ void testLocateLocal_data(); ++ void testLocateLocal(); + + }; + +diff --git a/src/core/kdesktopfile.cpp b/src/core/kdesktopfile.cpp +index 4a55030..52a97ec 100644 +--- a/src/core/kdesktopfile.cpp ++++ b/src/core/kdesktopfile.cpp +@@ -83,14 +83,14 @@ QString KDesktopFile::locateLocal(const QString &path) + // Relative to config? (e.g. for autostart) + Q_FOREACH (const QString &dir, QStandardPaths::standardLocations(QStandardPaths::GenericConfigLocation)) { + if (path.startsWith(dir + plus)) { +- relativePath = dir.mid(path.length() + 1); ++ relativePath = path.mid(dir.length() + 1); + return QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + QLatin1Char('/') + relativePath; + } + } + // Relative to xdg data dir? (much more common) + Q_FOREACH (const QString &dir, QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation)) { + if (path.startsWith(dir + plus)) { +- relativePath = dir.mid(path.length() + 1); ++ relativePath = path.mid(dir.length() + 1); + } + } + if (relativePath.isEmpty()) { diff --git a/kde-frameworks/kconfig/kconfig-5.33.0-r1.ebuild b/kde-frameworks/kconfig/kconfig-5.33.0-r1.ebuild new file mode 100644 index 00000000000..14e605e5b1c --- /dev/null +++ b/kde-frameworks/kconfig/kconfig-5.33.0-r1.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +VIRTUALX_REQUIRED="test" +inherit kde5 + +DESCRIPTION="Framework for reading and writing configuration" +LICENSE="LGPL-2+" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="nls" + +RDEPEND=" + $(add_qt_dep qtgui) + $(add_qt_dep qtxml) +" +DEPEND="${RDEPEND} + nls? ( $(add_qt_dep linguist-tools) ) + test? ( $(add_qt_dep qtconcurrent) ) +" + +# bug 560086 +RESTRICT+=" test" + +DOCS=( DESIGN docs/DESIGN.kconfig docs/options.md ) + +PATCHES=( "${FILESDIR}/${P}-relativePath.patch" )