On Fri, 2009-04-10 at 20:24 +0530, Abhishek Dasgupta wrote:
According to http://wiki.archlinux.org/index.php/Gnome_package_guidelines#GTK_Icon_cache
packages which install icons in /usr/share/icons/hicolor should depend on hicolor-icon-theme and invoke gtk-update-icon-cache.
I've made a namcap module [1] which checks for the existence of the /usr/share/icons/hicolor directory and then sees if gtk-update-icon-cache is called in the install file and if hicolor-icon-theme is in the depends array. Otherwise it is reported as an error.
http://github.com/abhidg/namcap/blob/d0f27f98d4e91b3fe37fc41395d0ba713f42101...
Looks great, and really saves me doing some work (or bugs sneaking in new versions of packages). This dependency check on hicolor-icon-theme, does it traverse down the dependency tree, or does it only look at what is in depends=()? As for the gtk-update-icon-cache check: there's an alternative provided by xdg-utils. An example can be found in openjdk6 and cups. This method uses xdg-icon-resource.