Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 790275

Summary: >=kde-frameworks/kwindowsystem-5.99: add PDEPEND="wayland? ( kde-plasma/kwayland-integration:5 )"
Product: Gentoo Linux Reporter: Nicolas Chappe <nchappe-bgo>
Component: Current packagesAssignee: Gentoo KDE team <kde>
Status: RESOLVED FIXED    
Severity: normal CC: sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://blog.martin-graesslin.com/blog/2015/07/plugins-plugins-plugins-or-how-kde-frameworks-learned-to-wayland/
See Also: https://phabricator.kde.org/T11903
https://bugs.gentoo.org/show_bug.cgi?id=883289
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 876484    
Bug Blocks:    

Description Nicolas Chappe 2021-05-14 22:36:58 UTC
Under wayland, kde-frameworks/kwindowsystem and kde-frameworks/kidletime (any version) need additional plugins provided by kde-plasma/kwayland-integration. This package is easy to miss, as its only revdep in the portage tree is kde-plasma/plasma-meta.
As kwindowsystem and kidletime do not work at all under wayland without the relevant plugins, kwayland-integration should probably be in their RDEPEND when the wayland USE flag is set.
Comment 1 Andreas Sturmlechner gentoo-dev 2021-05-15 09:34:46 UTC
I'm not convinced. Recommended for the *Plasma* Wayland session, yes, for which plasma-meta is already pulling it in. We could extend that to plasma-desktop/plasma-workspace, although then minimalist/X11 people would complain about another *wayland* dependency (even though kwin already hard-depends on dev-libs/wayland anyway).

None of the mentioned repositories have a reference to kwayland-integration.
Comment 2 Nicolas Chappe 2021-05-15 13:02:22 UTC
On minimalism, if the dependency is behind the wayland USE flag, wouldn't this be the same situation as e.g. dev-qt/qtgui that has "wayland? ( ~dev-qt/qtwayland-${PV} )" in its PDEPEND? I still think it should at least be in the PDEPEND of kidletime, as the plugin adds support for a wayland idle time protocol that is not specific to kwin or plasma (sway implements it too, see https://github.com/swaywm/sway/blob/master/protocols/idle.xml). As for the kwindowsystem plugin and the kguiaddons plugin, I don't know to what extent they are KDE-specific.

But I agree having kwayland-integration as a direct dependency of plasma-desktop[wayland] or kwin[wayland] would also make sense, I suppose most of kidletime/kguiaddons/kwindowsystem revdeps are specific to kwin and/or plasma anyways. At least it would solve the use case that made me open this bug: emerging plasma-desktop on a fresh gentoo install with USE="wayland" gives a perfectly usable desktop on wayland apart from this missing package and the resulting hard-to-debug kwin/plasma strange behaviors.
Comment 3 Andreas Sturmlechner gentoo-dev 2021-05-15 18:04:12 UTC
I'm curious what made you zero in on precisely those two Frameworks packages? Neither even currently has a wayland use flag, and for kidletime a grep for "wayland" returns completely empty.

Both packages are actually dependencies of kde-plasma/kwayland-integration itself, so this request would create a circular dependency unless using PDEPEND; optional runtime-only USE flags are banned.

(In reply to Nicolas Chappe from comment #2)
> At least it would solve the use case that made me open this bug:
> emerging plasma-desktop on a fresh gentoo install with USE="wayland" gives
> a perfectly usable desktop on wayland apart from this missing package
I'll have to disagree here. Emerging only kde-plasma/plasma-desktop is already broken in several ways in terms of a working desktop. It is not supported by kde proj (you go minimal, you collect the missing pieces yourself) and it is unclear why just for the wayland use case we should make a difference.

Also, neither plasma-desktop nor kwin currently have a wayland USE flag, which means we can't just reuse it to depend on kde-plasma/kwayland-integration - again, optional runtime-only USE flags are banned. kde-plasma/plasma-meta is the only place I see right now where that is possible.
Comment 4 Nicolas Chappe 2021-05-15 19:14:24 UTC
(In reply to Andreas Sturmlechner from comment #3)
> I'm curious what made you zero in on precisely those two Frameworks
> packages? Neither even currently has a wayland use flag, and for kidletime a
> grep for "wayland" returns completely empty.

Sorry, I should probably have given a bit more context to this report.
My understanding is that kidletime and kwindowsystem both rely on a system of platform plugins for their basic functionality, which means they are useless on wayland without a working wayland plugin. The problem is, they just provide X plugins.
This is where kwayland-integration comes into play. This package is made of three parts: a wayland plugin for kidletime, a wayland plugin for kwindowsystem, and a wayland plugin for kguiaddons (but this one seems less important, kguiaddons still mostly works without it). So the whole purpose of kwayland-integration is to make these three specific frameworks work properly on wayland. This is explained in more detail in a blog post from a KDE developer: https://blog.martin-graesslin.com/blog/2015/07/plugins-plugins-plugins-or-how-kde-frameworks-learned-to-wayland/.

> Both packages are actually dependencies of kde-plasma/kwayland-integration
> itself, so this request would create a circular dependency unless using
> PDEPEND; optional runtime-only USE flags are banned.

Indeed, I got RDEPEND and PDEPEND confused.

> Also, neither plasma-desktop nor kwin currently have a wayland USE flag,
> which means we can't just reuse it to depend on
> kde-plasma/kwayland-integration - again, optional runtime-only USE flags are
> banned. kde-plasma/plasma-meta is the only place I see right now where that
> is possible.

I didn't know about that, if optional PDEPEND flags are banned I guess it makes sense to close this bug. But I'm a bit confused as this situation is very similar to qtgui/qtwayland and qtgui does have a conditional PDEPEND dependency on qtwayland.
If for instance a non-KDE wayland user wants to run a KF5-based app that makes use of kidletime, they need kwayland-integration, but probably not plasma-meta, and I don't see how this could be expressed other than a conditional PDEPEND.
Comment 5 Andreas Sturmlechner gentoo-dev 2021-05-20 14:15:47 UTC
(In reply to Nicolas Chappe from comment #4)
> I didn't know about that, if optional PDEPEND flags are banned I guess it
> makes sense to close this bug. But I'm a bit confused as this situation is
> very similar to qtgui/qtwayland and qtgui does have a conditional PDEPEND
> dependency on qtwayland.
What we really need is proper optional runtime use flag support, which may or may not arrive in EAPI "xy"...

Optional PDEPEND in qtgui indeed exists despite the QA rule for lack of better alternatives: bug 689680

(In reply to Nicolas Chappe from comment #4)
> If for instance a non-KDE wayland user wants to run a KF5-based app that
> makes use of kidletime, they need kwayland-integration, but probably not
> plasma-meta, and I don't see how this could be expressed other than a
> conditional PDEPEND.
That's what I am really interested in, before taking any steps. Did you actually verify that using a non-Plasma wayland session? Because as long as this is just about minimalist plasma-desktop issue, I refer you back to minimalist-user-deals-with-minimalist-problems-themselves. It doesn't mean we can't improve the situation, but it is low-priority.
Comment 6 Andreas Sturmlechner gentoo-dev 2021-12-08 12:39:09 UTC
(In reply to Andreas Sturmlechner from comment #5)
> (In reply to Nicolas Chappe from comment #4)
> > If for instance a non-KDE wayland user wants to run a KF5-based app that
> > makes use of kidletime, they need kwayland-integration, but probably not
> > plasma-meta, and I don't see how this could be expressed other than a
> > conditional PDEPEND.
> That's what I am really interested in, before taking any steps. Did you
> actually verify that using a non-Plasma wayland session?
ping regarding the last paragraph.
Comment 7 Andreas Sturmlechner gentoo-dev 2022-10-06 10:44:51 UTC
Meanwhile upstream has been working on moving these components into the respective Frameworks packages:

modifierkeyinfo moved into kguiaddons:
https://invent.kde.org/frameworks/kguiaddons/-/commit/8aaad6e69242ae2720566aa3e9d57160d0994e98
https://invent.kde.org/plasma/kwayland-integration/-/commit/db2d1e751a8b44a83e9d27bd374cebae67bb0e89

idletime plugin is moving into kidletime:
https://invent.kde.org/frameworks/kidletime/-/commit/4554ddb97eb27eb3523e79b71fedef338b78d1f3
(will be dropped from kwayland-integration with Plasma 5.27)

That leaves windowsystem plugin for now.
Comment 8 Andreas Sturmlechner gentoo-dev 2022-10-06 11:15:28 UTC
We could, once a new Frameworks version >=5.99 has been stabilised and old versions were cleaned up, do:

- Drop idletime plugin downstream from <kde-plasma/kwayland-integration-5.27
- Raise minimum KF version to >=5.99 in kde-plasma/kwayland-integration:5
- Add PDEPEND="wayland? ( kde-plasma/kwayland-integration:5 )" to kde-frameworks/kwindowsystem in an exception similar to dev-qt/qtgui.
Comment 9 Larry the Git Cow gentoo-dev 2022-10-07 14:42:30 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/kde.git/commit/?id=4a2c435600c3af3b36907e40702fbd692581c520

commit 4a2c435600c3af3b36907e40702fbd692581c520
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2022-10-07 14:12:26 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2022-10-07 14:40:54 +0000

    kde-plasma/kwayland-integration: Drop idletime plugin
    
    >=kde-frameworks/kidletime-5.99[wayland] now contains a replacement
    plugin so we can disable it here to only keep windowsystem plugin.
    
    Bug: https://bugs.gentoo.org/790275
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../kwayland-integration/kwayland-integration-9999.ebuild | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
Comment 10 Larry the Git Cow gentoo-dev 2022-10-10 08:13:34 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/kde.git/commit/?id=e14630ee2601fd551a885eff3035ffea52715a6b

commit e14630ee2601fd551a885eff3035ffea52715a6b
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2022-10-07 14:48:36 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2022-10-09 16:38:32 +0000

    kde-plasma/kwayland-integration: Drop idletime plugin from 5.26
    
    After KFMIN was raised to 5.99 we can disable it here too.
    Only keep windowsystem plugin remains.
    
    Bug: https://bugs.gentoo.org/790275
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../kwayland-integration/kwayland-integration-5.26.0.ebuild | 13 +++++++------
 .../kwayland-integration-5.26.49.9999.ebuild                | 13 +++++++------
 2 files changed, 14 insertions(+), 12 deletions(-)
Comment 11 Larry the Git Cow gentoo-dev 2022-11-27 12:01:58 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bd248579143233dcae2f8d960614fe4119d0124

commit 4bd248579143233dcae2f8d960614fe4119d0124
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2022-11-27 11:54:43 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2022-11-27 12:01:40 +0000

    kde-frameworks/kwindowsystem: Add IUSE wayland to pull in runtime plugin
    
    All other plugins from kde-plasma/kwayland-integration went into respective
    Frameworks packages and only the kwindowsystem plugin remains, which makes
    this possible to depend on. It is necessary because kwindowsystem consumers
    will need the wayland runtime plugin even on non-Plasma systems.
    
    This is not exactly pretty but the same exception as dev-qt/qtgui[wayland].
    
    Bug: https://bugs.gentoo.org/790275
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../kwindowsystem/kwindowsystem-5.100.0-r1.ebuild  | 44 ++++++++++++++++++++++
 .../kwindowsystem/kwindowsystem-5.99.0-r1.ebuild   | 44 ++++++++++++++++++++++
 2 files changed, 88 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb62ab926640f615bb4dd4cdb57c92daab6fae16

commit bb62ab926640f615bb4dd4cdb57c92daab6fae16
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2022-10-07 14:12:26 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2022-11-27 12:01:40 +0000

    kde-plasma/kwayland-integration: Drop idletime plugin in 5.25.5 too
    
    By raising KFMIN to 5.99.0.
    
    >=kde-frameworks/kidletime-5.99[wayland] now contains a replacement
    plugin so we can disable it here to only keep windowsystem plugin.
    
    Bug: https://bugs.gentoo.org/790275
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../kwayland-integration-5.25.5-r1.ebuild          | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)
Comment 12 Larry the Git Cow gentoo-dev 2022-11-27 12:06:09 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/kde.git/commit/?id=959ff56929c61ec45e1f1e7b84da66437be5c894

commit 959ff56929c61ec45e1f1e7b84da66437be5c894
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2022-11-27 11:54:43 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2022-11-27 12:05:43 +0000

    kde-frameworks/kwindowsystem: Add IUSE wayland to pull in runtime plugin
    
    All other plugins from kde-plasma/kwayland-integration went into respective
    Frameworks packages and only the kwindowsystem plugin remains, which makes
    this possible to depend on. It is necessary because kwindowsystem consumers
    will need the wayland runtime plugin even on non-Plasma systems.
    
    This is not exactly pretty but the same exception as dev-qt/qtgui[wayland].
    
    Bug: https://bugs.gentoo.org/790275
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 kde-frameworks/kwindowsystem/kwindowsystem-9999.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)