SUMMARY Using kpackagetool5 / plasmapkg2 to install, update or remove a package from a folder will occasionally delete all locally installed widgets. I'm not sure if this is relevant, but in my case, the contents of the folder were: kpluginindex.json launchpadPlasma org.communia.apptitle org.kde.latte.separator org.kde.latte.sidebarbutton org.kde.latte.spacer org.kde.netspeedWidget org.kde.plasma.chiliclock org.kde.plasma.inlineBattery org.kde.plasma.uswitcher org.kde.plasma.webbrowser org.kpple.kppleMenu (scenario 1) STEPS TO REPRODUCE 1. "plasmapkg2 -r [path]" to remove a previously installed plugin, after which the plugin folder: this gives the output kf5.kpackage: Generated "/home/sora/.local/share/plasma/plasmoids//kpluginindex.json" ( 11 plugins) Successfully uninstalled [path] which is occasionally preceded by 3 iterations of kf5.kpackage: No metadata file in the package, expected it at: "/home/sora/.local/share/plasma/plasmoids/" 2. plasmapkg2 -u [path]" to [incorrectly] update said plugin instead of using "-i" for a fresh install: this gives the output Upgrading package from file: /tmp/kdeplasma-addons/applets/webbrowser/package/ Successfully upgraded [path] OBSERVED RESULT All folders previously present in ~/.local/share/plasma/plasmoids are gone and only the plugin referenced by "-u" remains, also there's no kpluginindex.json EXPECTED RESULT "plasmapkg2 -u" should either complain about the package not being installed and terminate or better, behave like "-i" in this situation (scenario 2) STEPS TO REPRODUCE 1. "plasmapkg2 -r [path]" to remove a plugin that's not installed in the first place: this gives the output Successfully uninstalled [path] OBSERVED RESULT The entire folder ~/.local/share/plasma/plasmoids is gone EXPECTED RESULT "plasmapkg2 -r" should fail in this situation (scenario 3) STEPS TO REPRODUCE 1. ??? <- I couldn't reliably reproduce this exact scenario as I couldn't work out the preconditions that have to be met but this has happened to me at least twice 2. "plasmapkg -i [path]" which gives the output: kf5.kpackage: Generated "/home/sora/.local/share/plasma/plasmoids//kpluginindex.json" ( 2 plugins) Successfully installed [path] OBSERVED RESULT like scenario 1, but a kpluginindex.json is generated EXPECTED RESULT the installation of the package alongside the previously installed packages SOFTWARE/OS VERSIONS Linux/KDE Plasma: Manjaro, kernel 5.6.12 KDE Plasma Version: 5.18.5 KDE Frameworks Version: 5.70.0 Qt Version: 5.14.2 ADDITIONAL INFORMATION Scenario 2 seems to be a duplicate of #410682, but scenario 1 and 3 seemed sufficiently different to #410682 to be filed separately.
does it always happen? if i do plasmapkg2 -r nonexisting i can't reproduce it, i only get Error: Plugin is not installed. as it's expected
Yes, it's reproducible. I guess I really should've mentioned earlier that the plugin in question is a modified version of org.kde.plasma.webbrowser which plasmapkg2 installed locally to ~/.local/share/plasma/plasmoids/, while the original version remains untouched in /usr/share/plasma/plasmoids/. The “add widget” overview lists both versions when installed and both are usable so this seems fine in general, but apparently it causes plasmapkg2 to wreak havoc. To reproduce (make sure to backup ~/.local/share/plasma/plasmoids/ beforehand): TEMPDIR=$(mktemp -d) cp /usr/share/plasma/plasmoids/org.kde.plasma.webbrowser/metadata.desktop $TEMPDIR plasmapkg2 -r $TEMPDIR This will delete the entire folder ~/.local/share/plasma/plasmoids/ if it doesn't contain a subfolder org.kde.plasma.webbrowser.
> kpackagetool5 / plasmapkg2 Which one? Just one? Both?
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!