Bug 436954 - Plasma Version detection broken and unreliable
Summary: Plasma Version detection broken and unreliable
Status: RESOLVED FIXED
Alias: None
Product: kinfocenter
Classification: Applications
Component: About this System (other bugs)
Version First Reported In: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 438829 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-05-12 04:43 UTC by skierpage
Modified: 2021-07-09 19:19 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.22
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description skierpage 2021-05-12 04:43:11 UTC
SUMMARY
In Fedora 34, System Information doesn't show KDE Plasma Version.

STEPS TO REPRODUCE
1. Run `kinfocenter` from a terminal, or start "system information" from Application Launcher.

OBSERVED RESULT
There's no KDE Plasma Version (even though this bug template calls for it).

EXPECTED RESULT
KDE Plasma Version used to appear. One workaround is run `plasmashell --version` in a terminal.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)    ← or not 😉
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2 on Wayland

ADDITIONAL INFORMATION
https://invent.kde.org/plasma/kinfocenter/-/blob/master/Modules/about-distro/src/PlasmaEntry.cpp is trying to get the Plasma version by reading the value of X-KDE-PluginInfo-Version from xsessions/plasma.desktop.
But https://invent.kde.org/plasma/plasma-workspace/-/tree/master/login-sessions now installs /usr/share/wayland-sessions/plasma.desktop and /usr/share/xsessions/plasmax11.desktop, so this lookup fails. I guess the code could look for wayland-sessions/plasma.desktop if the XDG_SESSION_TYPE environment variable == "wayland", otherwise xsessions/plasmax11.desktop.

As the code comments, this is an unreliable way to detect the Plasma version:
>  // Since Plasma version detection isn't based on a library query it can fail
>  // in weird cases; instead of admitting defeat we simply hide everything :P

kinfocenter doesn't seem to link in any plasma library that it could query for a version. For comparison, Gnome installs /usr/share/gnome/gnome-version.xml, 'a data file that exports the "GNOME" version to the Settings Details panel.'
Comment 1 Harald Sitter 2021-05-12 09:38:15 UTC
*achhooo* https://invent.kde.org/plasma/plasma-workspace/-/commit/c0415515b7eea92a0cc5f570032f9c9c6ff51d7f

I think my dirty hack allergies acted up.
Comment 2 Harald Sitter 2021-05-17 08:00:55 UTC
Git commit f5003ef5b03bffd0df3adafc0bf81cfb2fbe33b8 by Harald Sitter.
Committed on 17/05/2021 at 07:47.
Pushed by sitter into branch 'master'.

stop looking for the plasma version in the session file

this was probably left over from when the module was outside plasma. now
that it is in kinfocenter, and kinfocenter is part of plasma, we can
simply use our own version as the plasma entry version. they are in sync
across all of plasma anyway and because of that kinfocenter's version is
as good an indication for the version of Plasma, the product, as the
session file installed by plasma-workspace

M  +5    -14   Modules/about-distro/src/PlasmaEntry.cpp

https://invent.kde.org/plasma/kinfocenter/commit/f5003ef5b03bffd0df3adafc0bf81cfb2fbe33b8
Comment 3 Rex Dieter 2021-06-18 14:56:04 UTC
*** Bug 438829 has been marked as a duplicate of this bug. ***
Comment 4 Colin J Thomson 2021-06-18 18:48:04 UTC
Confirmed fixed with the 5.22.1-2 build from koji