[Slackbuilds-users] icon-theme.cache/doinst.sh(template)/sbo-maintainer-tools

Franzen slackbuilds at schoepfer.info
Sat Jun 17 18:05:36 UTC 2023


Hi all,

the content of a icon-file-cache(icon-theme.cache) like
/usr/share/icons/ICON_DIRECTORY/icon-theme.cache
depends on the tool "gtk-update-icon-cache".
Also all present icon caches like
/usr/share/icons/{ICON_DIRECTORY1,ICON_DIECTORY2}/icon-theme.cache
are regenerated at boot by /etc/rc.d/rc.M.
So, i think icon-theme.cache in the icon-directory should never be 
present in a package.

-> sbo-maintainer-tools might check that presence
-> sbo-maintainer-tools might warn if /usr/share/icons/ICON_DIRECTORY/
is present, but doinst.sh does not call gtk-update-icon-cache

The SBo doinst.sh-template says:
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
   if [ -x /usr/bin/gtk-update-icon-cache ]; then
     /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 
2>&1
   fi
fi

The logic to regenerate the cache if the cache is present does not make 
sense to me,
the cache should simply be (re)generated on installation.
->
if [ -x /usr/bin/gtk-update-icon-cache ]; then
   /usr/bin/gtk-update-icon-cache -f usr/share/icons/ICON_DIRECTORY 
 >/dev/null 2>&1
fi

That said, it seems a lot of builds use the example from doinst.sh with
usr/share/icons/hicolor, which does not make sense at all if there is no 
icon
in usr/share/icons/hicolor in the package.
Maybe sbo-maintainer-tools should also check for that.

What do you think? Feedback is welcome, thanks!

Cheers,

Johannes


More information about the SlackBuilds-users mailing list