Bug 371554

Summary: uninstall/upgrade options of plasmapkg2 don't work for kwinscripts
Product: [Plasma] Plasma SDK Reporter: github
Component: GeneralAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: antonis.tsiapaliokas
Priority: NOR    
Version First Reported In: 5.8.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description github 2016-10-24 03:12:15 UTC
`plasmapkg2 --type kwinscript` -r always says "Plugin ${pluginName} not installed" when uninstalling a plugin, if you up the version and replace `-r` with `-u` you get the same thing.

Reproducible: Always

Steps to Reproduce:
1. cd directory/containing/kwinscript
2. plasmapkg --type kwinscript -i .
3. plasmapkg --type kwinscript -r .

Actual Results:  
The kwinscript is still installed.

Expected Results:  
The kwinscript should be removed by `plasmapkg --type kwinscript -r .`
Comment 1 github 2016-10-24 03:15:09 UTC
Here's the output of me installing a script, uninstalling it, and then attempting to reinstall it again:

```
james@lonchil registerShortcut % plasmapkg2 --type kwinscript -i .                        
pluginname:  "shortcutsBug"
Generated  "/home/james/.local/share/kwin/scripts//kpluginindex.json"  ( 4  plugins)
org.kde.plasma: Could not register package as service (this is not necessarily fatal): "kwin-script-shortcutsBug.desktop"
Successfully installed /home/james/kde/test/registerShortcut
james@lonchil registerShortcut % plasmapkg2 --type kwinscript -r .
Calling KPluginInfo::property("X-KDE-PluginInfo-Name") is deprecated, use KPluginInfo::pluginName() in "/home/james/kde/built/lib64/plugins/plasma/packagestructure/plasma_packagestructure_share.so" instead.
Calling KPluginInfo::property("X-KDE-PluginInfo-Name") is deprecated, use KPluginInfo::pluginName() in "/usr/lib/qt/plugins/plasma/packagestructure/plasma_packagestructure_share.so" instead.
No metadata file in the package, expected it at: "/home/james/.local/share/kwin/scripts/"
No metadata file in the package, expected it at: "/home/james/.local/share/kwin/scripts/"
Constructing a KPluginInfo object from old style JSON. Please use kcoreaddons_desktop_to_json() for "/home/james/kde/test/registerShortcut" instead of kservice_desktop_to_json() in your CMake code.
Calling KPluginInfo::property("X-KDE-PluginInfo-Name") is deprecated, use KPluginInfo::pluginName() in "/home/james/kde/built/lib64/plugins/plasma/packagestructure/plasma_packagestructure_share.so" instead.
Calling KPluginInfo::property("X-KDE-PluginInfo-Name") is deprecated, use KPluginInfo::pluginName() in "/usr/lib/qt/plugins/plasma/packagestructure/plasma_packagestructure_share.so" instead.
Error: Plugin shortcutsBug is not installed.
james@lonchil registerShortcut % plasmapkg2 --type kwinscript -i .
pluginname:  "shortcutsBug"
org.kde.plasma: Could not register package as service (this is not necessarily fatal): "kwin-script-shortcutsBug.desktop"
Error: Installation of /home/james/kde/test/registerShortcut failed: /home/james/.local/share/kwin/scripts/shortcutsBug already exists
```

You can see the files are left behind after the "remove". The `-r` argument specifies that it takes the name, but specifying that instead of the path leads to the same results. It seems that it should accept the path though as it manages to resolve the path to the name.
Comment 2 Justin Zobel 2022-10-26 03:07:23 UTC
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 3 Bug Janitor Service 2022-11-10 05:12:37 UTC
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!
Comment 4 Bug Janitor Service 2022-11-25 05:22:50 UTC
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!