[OE-core] [PATCH 4/5] gtk-icon-cache: call postinst scriplet at do_rootfs time
Andreas Müller
schnitzeltony at googlemail.com
Fri Aug 3 23:22:54 UTC 2012
On Fri, Aug 3, 2012 at 10:19 PM, Laurentiu Palcu
<laurentiu.palcu at intel.com> wrote:
> This will improve first boot time because building the icon cache is
> done on host, with more processing power than the target.
>
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu at intel.com>
> ---
> meta/classes/gtk-icon-cache.bbclass | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass
> index 01fb2f3..2d82c54 100644
> --- a/meta/classes/gtk-icon-cache.bbclass
> +++ b/meta/classes/gtk-icon-cache.bbclass
> @@ -1,18 +1,12 @@
> FILES_${PN} += "${datadir}/icons/hicolor"
>
> -DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']}"
> +DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk+-native"
>
> -# This could run on the host as icon cache files are architecture independent,
> -# but there is no gtk-update-icon-cache built natively.
> gtk_icon_cache_postinst() {
> -if [ "x$D" != "x" ]; then
> - exit 1
> -fi
> -
> # Update the pixbuf loaders in case they haven't been registered yet
> GDK_PIXBUF_MODULEDIR=${libdir}/gdk-pixbuf-2.0/2.10.0/loaders gdk-pixbuf-query-loaders --update-cache
>
> -for icondir in /usr/share/icons/* ; do
> +for icondir in $D/usr/share/icons/* ; do
> if [ -d $icondir ] ; then
> gtk-update-icon-cache -fqt $icondir
> fi
> --
> 1.7.9.5
>
Long time ago there was a patch introducing gtk-icon-cache to be only
run once on the machine [1] and I am still using that. At that time I
was asked for a more generic approach. Now I ask:
1. Wouldn't it be better to have gtk-icon-cache run once even on host
2. Or better: How about a postinst 'runonce' framework for host/machine?
Andreas
[1] http://patches.openembedded.org/patch/24179/
More information about the Openembedded-core
mailing list