summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2022-03-26 17:37:27 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2022-03-26 17:39:56 +0100
commit72a9fbaf652fd36120c98c05cc648a24b2612ac9 (patch)
tree5d719f38b03da55f7275e2829ace8c7c5e9b7a08
parentkde-frameworks/knewstuff: Drop 5.92.0 (r0) (diff)
downloadgentoo-72a9fbaf652fd36120c98c05cc648a24b2612ac9.tar.gz
gentoo-72a9fbaf652fd36120c98c05cc648a24b2612ac9.tar.bz2
gentoo-72a9fbaf652fd36120c98c05cc648a24b2612ac9.zip
kde-frameworks/kcmutils: Fix KPluginSelector KCMs missing metadata
See also: https://mail.kde.org/pipermail/distributions/2022-March/001210.html KDE-bug: https://bugs.kde.org/444378 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--kde-frameworks/kcmutils/files/kcmutils-5.92.0-KDEBUG-444378.patch52
-rw-r--r--kde-frameworks/kcmutils/kcmutils-5.92.0-r1.ebuild36
2 files changed, 88 insertions, 0 deletions
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
new file mode 100644
index 000000000000..b0f5b947dfcd
--- /dev/null
+++ b/kde-frameworks/kcmutils/files/kcmutils-5.92.0-KDEBUG-444378.patch
@@ -0,0 +1,52 @@
+From c9c58de65c07c8a940cb4c9b91777450698f635c Mon Sep 17 00:00:00 2001
+From: Alexander Lohnau <alexander.lohnau@gmx.de>
+Date: Sun, 6 Mar 2022 21:31:51 +0100
+Subject: [PATCH] Fix KPluginSelector KCMs missing their metadata on plugin
+ loading
+
+For the KWin KCMs we need the full metadata, because we read the
+plugin keyword.
+
+Without the X-KDE-ConfigModule key, plugins used to create a symlink
+in the kservices5 folder to their metadata, which then goes through the
+legacy code path we would read all the metadata.
+This includes the plugin keyword.
+
+When consumers would this key, but have an old KWin version which
+used the KPluginSelector class and a kcmutils version which reads X-KDE-ConfigModule, but does not
+include this bugfix, the plugin keyword will be empty and thus the config
+files can not be located.
+
+This makes it hard to fix the loading on kcmutils < 5.91, but keeping the
+code working with KWin < 5.24.
+
+To test this, you should check out KWin 5.23 and kcmutils master.
+Fox example https://github.com/nclarius/tile-gaps/ will then fail
+to load it's config. With this change included, it should load properly.
+
+BUG: 444378
+---
+ src/kpluginselector.cpp | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/src/kpluginselector.cpp b/src/kpluginselector.cpp
+index d5248d3..1f4c651 100644
+--- a/src/kpluginselector.cpp
++++ b/src/kpluginselector.cpp
+@@ -969,10 +969,9 @@ void KPluginSelector::Private::PluginDelegate::configure(const QModelIndex &inde
+ const QString pluginId = configModule.mid(idx + 1);
+ metaDataList = {KPluginMetaData::findPluginById(pluginNamespace, pluginId)}; // Clear the list to avoid old desktop files to appear twice
+ } else {
+- // the KCMs don't need any metadata themselves, just set the name to make sure the KPluginMetaData object
+- // is valid & the internal usage has the data it needs
+- QJsonObject kplugin({{QLatin1String("Name"), pluginInfo.name()}});
+- KPluginMetaData data(QJsonObject{{QLatin1String("KPlugin"), kplugin}}, absoluteKCMPath);
++ // the KCMs don't need any metadata themselves, just use the one from the KPluginInfo object
++ // this way for example a KPackage plugin can specify plugin keyword
++ KPluginMetaData data(pluginInfo.toMetaData().rawData(), absoluteKCMPath);
+ metaDataList = {data}; // Clear the list to avoid old desktop files to appear twice
+ }
+ }
+--
+GitLab
+
diff --git a/kde-frameworks/kcmutils/kcmutils-5.92.0-r1.ebuild b/kde-frameworks/kcmutils/kcmutils-5.92.0-r1.ebuild
new file mode 100644
index 000000000000..8db8c72c2fc9
--- /dev/null
+++ b/kde-frameworks/kcmutils/kcmutils-5.92.0-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_TEST="forceoptional"
+PVCUT=$(ver_cut 1-2)
+QTMIN=5.15.2
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org
+
+DESCRIPTION="Framework to work with KDE System Settings modules"
+LICENSE="LGPL-2"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE=""
+
+DEPEND="
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtdeclarative-${QTMIN}:5[widgets]
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ =kde-frameworks/kauth-${PVCUT}*:5
+ =kde-frameworks/kconfig-${PVCUT}*:5
+ =kde-frameworks/kconfigwidgets-${PVCUT}*:5
+ =kde-frameworks/kcoreaddons-${PVCUT}*:5
+ =kde-frameworks/kdeclarative-${PVCUT}*:5
+ =kde-frameworks/kguiaddons-${PVCUT}*:5
+ =kde-frameworks/ki18n-${PVCUT}*:5
+ =kde-frameworks/kitemviews-${PVCUT}*:5
+ =kde-frameworks/kservice-${PVCUT}*:5
+ =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
+ =kde-frameworks/kxmlgui-${PVCUT}*:5
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-KDEBUG-444378.patch" )