Bug 449727

Summary: Cannot uninstall newly installed Plasma Style (not active currently)
Product: [Frameworks and Libraries] frameworks-kpackage Reporter: Piotr Mierzwinski <piotr.mierzwinski>
Component: defaultAssignee: Marco Martin <notmart>
Severity: normal CC: alexander.lohnau, bugseforuns, forestix, leinir, nate, qydwhotmail, sephiroth_pk
Priority: NOR    
Version: 5.102.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.104
Sentry Crash Report:
Attachments: Error uninstalling Plasma Style

Description Piotr Mierzwinski 2022-02-07 01:11:08 UTC
Created attachment 146370 [details]
Error uninstalling Plasma Style

I installed Plasma Style by "Gen New Plasma Style", applied it to check how it looks in real, and after back to my previous. Later I wanted to remove this newly installed "Plasma Style" but wasn't able. Always I got error message saying that 
"Removing theme failed Error: Plugin [its name] is not installed"
I tried with: "Greybird-Dark" and also tried with other. Result was the same.

1.  Install new Plasma Style by "Gen New Plasma Style" (I tested "Greybird-Dark")
2. Apply it
3. Back to your previous
4. Try to delete newly installed 

Appears error: "Removing theme failed Error: Plugin [name] is not installed"

I should be able to remove newly installed theme.

Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90
Qt Version: 5.15.2 with last KDE patches

Comment 1 Riccardo Robecchi 2022-02-20 11:44:05 UTC
I can confirm the bug.
Comment 2 Forest 2023-02-08 03:18:09 UTC
I reproduced this on a fresh install from neon-testing-20230207-0250.iso.


Settings: Appearance: Plasma Style: Get New Plasma Styles...
Install one of them
Close the Download New Plasma Styles window
Select the new theme
Apply changes
Click the theme's Trash icon
Apply changes

A red error banner appears with this message: "Removing theme failed: Error: Plugin [...] is not installed."

The style remains in the installed styles list, even after a reboot.
Comment 3 Fushan Wen 2023-02-11 04:22:37 UTC
Do other themes also have the problem?
Comment 4 Forest 2023-02-11 04:25:50 UTC
Yes. I reproduced it with several different themes.
Comment 5 Bug Janitor Service 2023-02-11 04:52:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kpackage/-/merge_requests/65
Comment 6 Fushan Wen 2023-02-11 13:58:03 UTC
Git commit 1bdaf324a7b78738ffc09ed4a5563666fa85e9d2 by Fushan Wen.
Committed on 11/02/2023 at 08:54.
Pushed by alex into branch 'kf5'.

Check pluginId contains '/' before using it as package type

Some old packages do not contain ServiceTypes field, and their plugin
name/id is not a package type. Usually a package type string contains
'/', so add check for that.
FIXED-IN: 5.104

A  +18   -0    autotests/data/testplasmathemepackagewithoutservicetypes/metadata.desktop
M  +12   -0    autotests/querytest.cpp
M  +2    -0    autotests/querytest.h
M  +4    -3    src/kpackage/private/utils.h

Comment 7 Patrick Silva 2023-02-18 12:01:26 UTC
*** Bug 418099 has been marked as a duplicate of this bug. ***