Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 420277 - QA notice for missing icon cache update
Summary: QA notice for missing icon cache update
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Portage team
URL: http://developer.gnome.org/gtk/2.24/g...
Whiteboard:
Keywords:
Depends on:
Blocks: 631448
  Show dependency tree
 
Reported: 2012-06-08 16:54 UTC by Julian Ospald
Modified: 2019-09-14 20:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Ospald 2012-06-08 16:54:36 UTC
When installing icons into any of the freedesktop compliant subdirs of /usr/share/icons the icon-cache should always get updated too even though some DEs might handle it differently (not sure about KDE, but we cannot know for sure what the user is on).

The gnome2-utils eclass provides functions for that (using "gtk-update-icon-cache"). A repoman check would not catch icons installed by the build system so maybe a QA notice would be better (means we check what files got installed and if the icon cache got/gets updated too).

I don't know exactly how such an implementation would look like...
Comment 1 Zac Medico gentoo-dev 2012-06-08 19:23:38 UTC
Maybe we can check the mtime of the icon cache before and after install. What kind of file(s) does the icon cache use, and where is/are they saved?
Comment 2 Julian Ospald 2012-06-09 22:01:59 UTC
(In reply to comment #1)
> Maybe we can check the mtime of the icon cache before and after install.
> What kind of file(s) does the icon cache use, and where is/are they saved?

http://developer.gnome.org/gtk/2.24/gtk-update-icon-cache.html

It needs index.theme files from the icon subdirs and writes icon-theme.cache into the subdirs. I currently have:

/usr/share/icons/Crux/icon-theme.cache
/usr/share/icons/Gant.Xfce/icon-theme.cache
/usr/share/icons/Human/icon-theme.cache
/usr/share/icons/Mist/icon-theme.cache
/usr/share/icons/Tango/icon-theme.cache
/usr/share/icons/gnome/icon-theme.cache
/usr/share/icons/hicolor/icon-theme.cache
/usr/share/icons/oxygen/icon-theme.cache
/usr/share/icons/yasis/icon-theme.cache


In those dirs only PNG, XPM and SVG are allowed, although XPM is only for backwards compatibility and should not be used any longer.
Comment 3 Julian Ospald 2012-07-05 20:36:15 UTC
Can the gnome herd comment on this?

We were considering to have portage update the icon cache, but are unsure how that would impact gnome2 and gnome2-utils eclasses. Opinions?
Comment 4 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-07-05 21:52:04 UTC
(In reply to comment #3)
> Can the gnome herd comment on this?
> 
> We were considering to have portage update the icon cache, but are unsure
> how that would impact gnome2 and gnome2-utils eclasses. Opinions?

Such a change to portage behavior probably ought to go in the next EAPI, since it affects what files implicitly get written on disk. Even if portage, paludis, and pkgcore tomorrow all started automatically updating the icon cache in EAPI0..4, we won't be able to remove gnome2_icon_cache_update() from gnome2-utils.eclass until the new version of portage has been stable for a year or so, for fear of breaking a big part of the tree on rarely-updated systems.

However, a QA check that yells at developers who install an icon without updating the cache would certainly be welcome.
Comment 5 Gilles Dartiguelongue (RETIRED) gentoo-dev 2014-03-03 23:28:07 UTC
FTR, glib, gtk+, gdk-pixbuf in ~arch are now owners of the relevant cache files they need as discussed some times ago on the mailing list.
Comment 6 Zac Medico gentoo-dev 2019-09-14 19:53:46 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=5e153472ee6c2f9514e20a6a6434804e46292e68

commit 5e153472ee6c2f9514e20a6a6434804e46292e68
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2017-08-15 11:10:06 +0200
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2017-08-26 23:16:12 +0200

    Add post-postinst checks for a few missed cache updates
    
    Add postinst-qa-check.d checks for missed desktop, mime-info and GTK+
    icon cache updates. In all of the cases the checks simply look for any
    installed files that are newer than the cache.
    
    This check has some limitations: it assumes that mtime is not preserved
    when copying files to D, it can't distinguish whether the files
    were installed by the current package (it reports all new files since
    the last cache update) and it can't distinguish between the update
    on postinst and postrm. However, it's certainly a step forward and will
    help find a few bugs.
    
    Reviewed-by: Zac Medico <zmedico@gentoo.org>

 bin/postinst-qa-check.d/50gnome2-utils | 38 ++++++++++++++++++++
 bin/postinst-qa-check.d/50xdg-utils    | 65 ++++++++++++++++++++++++++++++++++
 2 files changed, 103 insertions(+)
Comment 7 Zac Medico gentoo-dev 2019-09-14 19:56:03 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=571947cbec7f1f79f8cfff5a4b1ecac129f8e635

commit 571947cbec7f1f79f8cfff5a4b1ecac129f8e635
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
AuthorDate: 2019-02-12 05:47:45 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-02-12 23:35:37 +0000

    {pre,post}inst-qa-check.d: Move gnome2_icon_cache_check() from 50gnome2-utils to 50xdg-utils.
    
    No changes inside source code of this function.
    
    Bug: https://bugs.gentoo.org/677776
    Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 bin/postinst-qa-check.d/50gnome2-utils | 54 ----------------------------------
 bin/postinst-qa-check.d/50xdg-utils    | 54 ++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 54 deletions(-)