Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kcmutils/files/, kde-frameworks/kcmutils/
Date: Sat, 26 Mar 2022 16:40:16
Message-Id: 1648312796.72a9fbaf652fd36120c98c05cc648a24b2612ac9.asturm@gentoo
1 commit: 72a9fbaf652fd36120c98c05cc648a24b2612ac9
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 26 16:37:27 2022 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 26 16:39:56 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72a9fbaf
7
8 kde-frameworks/kcmutils: Fix KPluginSelector KCMs missing metadata
9
10 See also:
11 https://mail.kde.org/pipermail/distributions/2022-March/001210.html
12
13 KDE-bug: https://bugs.kde.org/444378
14 Package-Manager: Portage-3.0.30, Repoman-3.0.3
15 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
16
17 .../files/kcmutils-5.92.0-KDEBUG-444378.patch | 52 ++++++++++++++++++++++
18 kde-frameworks/kcmutils/kcmutils-5.92.0-r1.ebuild | 36 +++++++++++++++
19 2 files changed, 88 insertions(+)
20
21 diff --git a/kde-frameworks/kcmutils/files/kcmutils-5.92.0-KDEBUG-444378.patch b/kde-frameworks/kcmutils/files/kcmutils-5.92.0-KDEBUG-444378.patch
22 new file mode 100644
23 index 000000000000..b0f5b947dfcd
24 --- /dev/null
25 +++ b/kde-frameworks/kcmutils/files/kcmutils-5.92.0-KDEBUG-444378.patch
26 @@ -0,0 +1,52 @@
27 +From c9c58de65c07c8a940cb4c9b91777450698f635c Mon Sep 17 00:00:00 2001
28 +From: Alexander Lohnau <alexander.lohnau@×××.de>
29 +Date: Sun, 6 Mar 2022 21:31:51 +0100
30 +Subject: [PATCH] Fix KPluginSelector KCMs missing their metadata on plugin
31 + loading
32 +
33 +For the KWin KCMs we need the full metadata, because we read the
34 +plugin keyword.
35 +
36 +Without the X-KDE-ConfigModule key, plugins used to create a symlink
37 +in the kservices5 folder to their metadata, which then goes through the
38 +legacy code path we would read all the metadata.
39 +This includes the plugin keyword.
40 +
41 +When consumers would this key, but have an old KWin version which
42 +used the KPluginSelector class and a kcmutils version which reads X-KDE-ConfigModule, but does not
43 +include this bugfix, the plugin keyword will be empty and thus the config
44 +files can not be located.
45 +
46 +This makes it hard to fix the loading on kcmutils < 5.91, but keeping the
47 +code working with KWin < 5.24.
48 +
49 +To test this, you should check out KWin 5.23 and kcmutils master.
50 +Fox example https://github.com/nclarius/tile-gaps/ will then fail
51 +to load it's config. With this change included, it should load properly.
52 +
53 +BUG: 444378
54 +---
55 + src/kpluginselector.cpp | 7 +++----
56 + 1 file changed, 3 insertions(+), 4 deletions(-)
57 +
58 +diff --git a/src/kpluginselector.cpp b/src/kpluginselector.cpp
59 +index d5248d3..1f4c651 100644
60 +--- a/src/kpluginselector.cpp
61 ++++ b/src/kpluginselector.cpp
62 +@@ -969,10 +969,9 @@ void KPluginSelector::Private::PluginDelegate::configure(const QModelIndex &inde
63 + const QString pluginId = configModule.mid(idx + 1);
64 + metaDataList = {KPluginMetaData::findPluginById(pluginNamespace, pluginId)}; // Clear the list to avoid old desktop files to appear twice
65 + } else {
66 +- // the KCMs don't need any metadata themselves, just set the name to make sure the KPluginMetaData object
67 +- // is valid & the internal usage has the data it needs
68 +- QJsonObject kplugin({{QLatin1String("Name"), pluginInfo.name()}});
69 +- KPluginMetaData data(QJsonObject{{QLatin1String("KPlugin"), kplugin}}, absoluteKCMPath);
70 ++ // the KCMs don't need any metadata themselves, just use the one from the KPluginInfo object
71 ++ // this way for example a KPackage plugin can specify plugin keyword
72 ++ KPluginMetaData data(pluginInfo.toMetaData().rawData(), absoluteKCMPath);
73 + metaDataList = {data}; // Clear the list to avoid old desktop files to appear twice
74 + }
75 + }
76 +--
77 +GitLab
78 +
79
80 diff --git a/kde-frameworks/kcmutils/kcmutils-5.92.0-r1.ebuild b/kde-frameworks/kcmutils/kcmutils-5.92.0-r1.ebuild
81 new file mode 100644
82 index 000000000000..8db8c72c2fc9
83 --- /dev/null
84 +++ b/kde-frameworks/kcmutils/kcmutils-5.92.0-r1.ebuild
85 @@ -0,0 +1,36 @@
86 +# Copyright 1999-2022 Gentoo Authors
87 +# Distributed under the terms of the GNU General Public License v2
88 +
89 +EAPI=8
90 +
91 +ECM_TEST="forceoptional"
92 +PVCUT=$(ver_cut 1-2)
93 +QTMIN=5.15.2
94 +VIRTUALX_REQUIRED="test"
95 +inherit ecm kde.org
96 +
97 +DESCRIPTION="Framework to work with KDE System Settings modules"
98 +LICENSE="LGPL-2"
99 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
100 +IUSE=""
101 +
102 +DEPEND="
103 + >=dev-qt/qtdbus-${QTMIN}:5
104 + >=dev-qt/qtdeclarative-${QTMIN}:5[widgets]
105 + >=dev-qt/qtgui-${QTMIN}:5
106 + >=dev-qt/qtwidgets-${QTMIN}:5
107 + =kde-frameworks/kauth-${PVCUT}*:5
108 + =kde-frameworks/kconfig-${PVCUT}*:5
109 + =kde-frameworks/kconfigwidgets-${PVCUT}*:5
110 + =kde-frameworks/kcoreaddons-${PVCUT}*:5
111 + =kde-frameworks/kdeclarative-${PVCUT}*:5
112 + =kde-frameworks/kguiaddons-${PVCUT}*:5
113 + =kde-frameworks/ki18n-${PVCUT}*:5
114 + =kde-frameworks/kitemviews-${PVCUT}*:5
115 + =kde-frameworks/kservice-${PVCUT}*:5
116 + =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
117 + =kde-frameworks/kxmlgui-${PVCUT}*:5
118 +"
119 +RDEPEND="${DEPEND}"
120 +
121 +PATCHES=( "${FILESDIR}/${P}-KDEBUG-444378.patch" )