Bug 403229 - Icon cache doesn't get automatically cleaned when a release has new/changed icons
Summary: Icon cache doesn't get automatically cleaned when a release has new/changed i...
Status: CONFIRMED
Alias: None
Product: Breeze
Classification: Plasma
Component: Icons (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: visual-design
URL:
Keywords:
: 419919 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-01-15 11:27 UTC by Matej Mrenica
Modified: 2020-04-15 14:45 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matej Mrenica 2019-01-15 11:27:29 UTC
See this for visual description: https://imgur.com/a/JyU7DK5

SOFTWARE/OS VERSIONS
Arch Linux
KDE Plasma Version: 5.14.5
KDE Frameworks Version: 5.54
Qt Version: 5.12.0
Comment 1 Matej Mrenica 2019-01-15 11:29:52 UTC
The icon view is also affected
Comment 2 Nate Graham 2019-01-15 20:31:12 UTC
Does the problem go away if you clear your icon cache with `rm ~/.cache/icon-cache.kcache` and then reboot?
Comment 3 Matej Mrenica 2019-01-16 07:18:33 UTC
(In reply to Nate Graham from comment #2)
> Does the problem go away if you clear your icon cache with `rm
> ~/.cache/icon-cache.kcache` and then reboot?

Yes, that did help. Couldn't it had been done automatically? Or would also changing icon pack to something else and back solve this?
Comment 4 Nate Graham 2019-01-16 22:21:10 UTC
Good question. Ideally this would have happened automatically. I'll look into whether this is something on our end, or the package manager should have done it.
Comment 5 Nate Graham 2019-02-05 02:17:58 UTC
Filed some downstream bug reports for distros to adjust their packaging:

- https://bugs.archlinux.org/task/61632
- https://bugzilla.opensuse.org/show_bug.cgi?id=1124243
- https://bugs.launchpad.net/ubuntu/+source/breeze-icons/+bug/1814612
Comment 6 Eli Schwartz 2019-02-05 02:38:12 UTC
I see no reason for Arch Linux to violate policy by having a package manager modify something that isn't a package. We don't modify $HOME in our packaging, and even mentioning the idea traditionally provokes a hair-trigger response "only the worst ever packages would ever dare touch $HOME, what is this package and can we have it deleted".

Why doesn't Breeze figure out based on hashes or timestamps, that the original files have changed and an update is needed?
Comment 7 Nate Graham 2019-02-05 02:48:28 UTC
Gotcha, we'll try to take care of it ourselves. My ignorance of packaging best practices is definitely showing. :)
Comment 8 Eli Schwartz 2019-02-05 02:58:39 UTC
It's anyway the wrong level to try implementing this -- how do you robustly log into every user on the system regardless of their home directory, then execute their bashrc, .pam_environment, and .config/environment.d (this one is a bit of circular logic) in order to find out whether $XDG_CACHE_HOME has been set, and finally delete `${XDG_CACHE_HOME:-$HOME/.cache}/icon-cache.kcache`?

I mean... you "could" do so, but it begins to become somewhat uncomfortable, and the #1 place to find an overridden variable also introduces arbitrary code execution. Even run as the user, there may be things there that users don't want to be executed unless they are the ones logging in.
Comment 9 Felix Miata 2019-02-05 05:39:04 UTC
This bug to me begs the question why Plasma caches so much in the first place. Some of its caches seem so large that I'd expect less overall overhead reading directly from disk into RAM rather than handling its multiple big caches, create, read, store and include amongst other settings getting backed up from the homedir.
Comment 10 Christoph Feck 2019-02-21 18:17:18 UTC
Cache files are mmap'ed for maximum performance. Since mmap's cannot easily get resized, they are created with a large size.

Icon caches are still faster to use than to traverse XDG icon paths to check for icons. This is especially true for SVG icons (and SVG Plasma themes), because the cache stores readily rendered bitmaps, instead of SVG.
Comment 11 Nate Graham 2019-02-21 18:31:07 UTC
Christoph, with your experience here, do you have any ideas for how we can resolve this? Is there any way the breeze icons package can hook in the pre-existing cache invalidation-on-upgrade mechanism?
Comment 12 Nate Graham 2020-04-15 14:45:45 UTC
*** Bug 419919 has been marked as a duplicate of this bug. ***