Prefer `plasmashell --version` to get Plasma version
AbandonedPublic

Authored by ngraham on Apr 16 2017, 8:26 AM.

Details

Reviewers
None
Group Reviewers
Plasma
Summary

Use /usr/bin/plasmashell --version to get the Plasma version

BUG: 377994

Test Plan

Verified original problem by changing the value of X-KDE-PluginInfo-Version in /usr/share/xsessions/plasma5.desktop and seeing that kinfocenter displays the new (incorrect) value.

make test: passed

Verified changes by deploying rebuilt /usr/lib64/qt5/plugins/kcm_about_distro.so file and seeing that kinfoCenter does not display the incorrect value in /usr/share/xsessions/plasma5.desktop, correctly using the value from /usr/local/bin/plasmashell --version instead.

Replaced /usr/local/bin/plasmashell with a shell script that displays a different value and verified that the different value is displayed in kinfocenter

Replaced /usr/local/bin/plasmashell with a shell script that displays a different value that does not follow the correct format or exits with a nonzero status and verified that the output is not displayed in kinfocenter and that it correctly falls back to reading the value from the distro-provided .desktop file.

Diff Detail

Repository
R102 KInfoCenter
Lint
Lint Skipped
Unit
Unit Tests Skipped
ngraham created this revision.Apr 16 2017, 8:26 AM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 16 2017, 8:26 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript

I can't comment on the content of the patch, but I have a comment on the titles and the summary.

The content of title+summary+test plan will become the git commit message, so I would:

BUG: 377994

which will do the magic when/if the commit is pushed.

ngraham retitled this revision from https://bugs.kde.org/show_bug.cgi?id=377994 to Prefer `plasmashell --version` to get Plasma version.Apr 16 2017, 9:29 AM
ngraham edited the summary of this revision. (Show Details)

Thanks! I've implemented the requested changes.

sitter added a subscriber: sitter.Apr 16 2017, 10:44 AM

plasma.desktop is provided by us https://cgit.kde.org/plasma-workspace.git/tree/plasma.desktop.cmake and set programmatically to the very same version you'd get with --version. There's not much to be done if distros mess this up.

I should think the solution to your problem is asking opensuse nicely to stop changing plasma's version numbers or at least do it in a manner that doesn't involve humans, instead of adding excessive amounts of additional code which blocks the module initialization on waiting for another binary to work around a problem that may well be intentional as far as opensuse is concerned.

Speed, code readability and reliability is precisely why we opted to get the data from our session desktop file rather than going through a binary which is ultimately going to tell us the same thing as far as our upstream code is concerned.

fvogt added a subscriber: fvogt.Apr 16 2017, 11:21 AM

I don't know why openSUSE started replacing the upstream plasma5 session file with something that is basically an exact copy, I was not involved in the process.
However, I also think that it is wrong and needs to be cleaned up.

I can only think of a single valid reason to do this: Independence of the plasma version and the version of plasma-workspace.
This does make sense for maintenance updates, as our maintenance team does not accept packages without bugfixes.
So if there was a release of plasma without any changes to plasma-workspace, it would not get updated and the old version stays.

It's definitely on my todo list to fix this, but as it's only a cosmetic issue (the files are identical except for the version number) it's fairly low priority.

Gotcha. I'll contact the openSUSE KDE packagers and see what they have to say.

ngraham abandoned this revision.Aug 17 2017, 5:52 PM

Not needed.