Bug 389197 - Installing compressed version of package on top of old uncompressed version causes severe issues
Summary: Installing compressed version of package on top of old uncompressed version c...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kpackage
Classification: Frameworks and Libraries
Component: default (show other bugs)
Version: 5.42.0
Platform: Other Linux
: HI normal
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords: regression
: 389101 389297 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-01-19 10:22 UTC by Vadym Krevs
Modified: 2021-06-04 08:16 UTC (History)
11 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vadym Krevs 2018-01-19 10:22:13 UTC
openSUSE 42.3. Just updated to latest KDE from OBS. As a result, the Dilbert comic no longer loads. Removing the comic strip widget and re-adding (reinstalling the Dilbert comic strip in the process) results in an empty box with the "Configure..." button as if nothing was done.

$ rpm -qa | grep plasma | sort
patterns-openSUSE-kde_plasma-20170518-6.1.x86_64                                                                                                                                  
plasma5-addons-5.11.95-171.1.x86_64                                                                                                                                               
plasma5-addons-lang-5.11.95-171.1.noarch                                                                                                                                          
plasma5-defaults-openSUSE-42.1.1-264.1.noarch                                                                                                                                     
plasma5-desktop-5.11.95-289.1.x86_64                                                                                                                                              
plasma5-desktop-lang-5.11.95-289.1.noarch                                                                                                                                         
plasma5-integration-plugin-5.11.95-1.1.x86_64                                                                                                                                     
plasma5-integration-plugin-lang-5.11.95-1.1.noarch
plasma5-pa-5.11.95-118.1.x86_64
plasma5-pa-lang-5.11.95-118.1.noarch
plasma5-pk-updates-0.3.1-34.1.x86_64
plasma5-pk-updates-debuginfo-0.3.1-34.1.x86_64
plasma5-pk-updates-lang-0.3.1-34.1.noarch
plasma5-session-5.11.95-374.1.noarch
plasma5-theme-openSUSE-42.1.1-264.1.noarch
plasma5-workspace-5.11.95-374.1.x86_64
plasma5-workspace-branding-openSUSE-42.1.1-264.1.noarch
plasma5-workspace-debuginfo-5.11.95-374.1.x86_64
plasma5-workspace-lang-5.11.95-374.1.noarch
plasma5-workspace-libs-5.11.95-374.1.x86_64
plasma5-workspace-wallpapers-5.11.95-112.1.noarch
plasma-framework-5.42.0-201.1.x86_64
plasma-framework-components-5.42.0-201.1.x86_64
plasma-framework-components-debuginfo-5.42.0-201.1.x86_64
plasma-framework-debuginfo-5.42.0-201.1.x86_64
plasma-framework-lang-5.42.0-201.1.noarch
plasma-framework-private-5.42.0-201.1.x86_64
plasma-framework-private-debuginfo-5.42.0-201.1.x86_64
plasma-nm5-5.11.95-185.1.x86_64
plasma-nm5-lang-5.11.95-185.1.noarch
plasma-nm5-openconnect-5.11.95-185.1.x86_64
plasma-nm5-openvpn-5.11.95-185.1.x86_64
plasma-nm5-pptp-5.11.95-185.1.x86_64
plasma-nm5-vpnc-5.11.95-185.1.x86_64
Comment 1 Kai Uwe Broulik 2018-01-19 10:25:01 UTC
Works here. I downloaded the "Dilbert (en)" from the store and it works fine.
Comment 2 Fabian Vogt 2018-01-19 13:04:06 UTC
I tried on 42.3 and it works fine here as well. Did you enable "Dilbert" in the configuration after installation?
Comment 3 Vadym Krevs 2018-01-20 23:12:06 UTC
Problem is that there was nothing to enable. Usually, there is a checkbox next to the downloaded comic - but there is nothing now.
Comment 4 Kai Uwe Broulik 2018-01-21 00:29:02 UTC
Can you provide a screenshot of that?
Comment 5 Vadym Krevs 2018-01-22 09:18:21 UTC
Short video:
https://photos.app.goo.gl/t34IypynI9vxHrTx1
Comment 6 Wolfgang Bauer 2018-01-24 16:50:43 UTC
I had a similar problem here (also after updating to 5.11.95 and Frameworks 5.42).

The installed comics didn't show up in the settings anymore, and installing them again (they showed up as uninstalled in the "Get New" dialog) didn't change that.

After I installed a different comic, they reappeared though, everything works fine here now.
Comment 7 Vadym Krevs 2018-01-25 15:31:21 UTC
Wolfgang - thank you, your workaround (installing a different comic) worked.
Comment 8 Wolfgang Bauer 2018-01-27 09:27:47 UTC
As I have another system with the same problem, I was able to investigate this some more.

Moving away the file ~/.local/share/plasma/comic/kplugincache.json fixes it as well, moving that file back breaks it again.

I suppose the reason is this:
$ kpackagetool5 -l -t Plasma/Comic
Listing service types: Plasma/Comic in /home/test/.local/share/plasma/comics/
kf5.karchive: bzDecompress returned -5

After downgrading kpackage to 5.41.0:
$ kpackagetool5 -l -t Plasma/Comic
Listing service types: Plasma/Comic in /home/test/.local/share/plasma/comics/
kpluginindex: Using indexfile:  "/home/test/.local/share/plasma/comics/kpluginindex.json" true
garfield
nichtlustig


I found https://cgit.kde.org/kpackage.git/commit/?id=056fc67cecda5e5bd0541f57181e70a80bc72476 introduced compressing this file, but apparently it can't read *uncompressed* files from previous versions anymore.
(installing a new comic helps as this deletes that cache file)

This will likely affect other things too, not just the comic applet.
Comment 9 Wolfgang Bauer 2018-01-27 09:42:29 UTC
(In reply to Wolfgang Bauer from comment #8)
> Moving away the file ~/.local/share/plasma/comic/kplugincache.json fixes it
> as well, moving that file back breaks it again.

I mean kpluginindex.json, of course.
Comment 10 Wolfgang Bauer 2018-01-27 14:54:44 UTC
*** Bug 389101 has been marked as a duplicate of this bug. ***
Comment 11 Chris Holland 2018-02-19 21:10:26 UTC
TL;DR: Confirm Wolfgang's findings that the compression changed (none? => something).

-----

I noticed that my task switcher theme (`./local/share/kwin/tabbox/thumbnail_grid`) had changed to "List". It wasn't detected either in the system settings either even though it was still installed on disk.

Several of my widgets (redshift and some of mine) also disappeared from the panel.

I found that deleting:
~/.local/share/plasma/plasmoids/kpluginindex.json
~/.local/share/kwin/tabbox/kpluginindex.json

And restarting the system settings would allow me to select my Task Switcher skin.
For the missing widgets, I had to restart plasmashell.

At first I thought maybe it was just me (since I tend to fuck with the customization stuff), but I've noticed a few others have detected this too. The fix also worked for this guy:
* https://www.reddit.com/r/kde/comments/7yox2j/redshitft_not_showing_up_in_the_system_tray/

Maybe this too:
* https://www.reddit.com/r/kde/comments/7xm4xp/installed_themes_dont_show_up_in_list/


-----

I noticed that the old file is ~300Kb and the new file is ~40Kb.

In the old file, you can read same of the strings using a hex editor.
In the new file there's no readable strings.

So the compression (or lack there of) was changed, which supports Wolfgang's findings.
Comment 12 Antonio Rojas 2018-02-23 15:04:41 UTC
*** Bug 389297 has been marked as a duplicate of this bug. ***
Comment 13 Antonio Rojas 2018-02-23 15:06:08 UTC
This can cause severe issues for users who have run Plasma as root at some point, see bug 389297
Comment 14 Wolfgang Bauer 2021-06-04 08:16:45 UTC
This should be fixed in KDE Frameworks 5.82.0 by this change:
https://invent.kde.org/frameworks/kpackage/-/commit/3a82b33e57c2577f31a7e496d81358a4de0b305c

The kpluginindex.json caching was removed completely, existing files will be ignored now and therefore no longer cause problems.