On Thu, 2012-03-22 at 20:15 +0100, Andreas Müller wrote:
> * Before this patch every inheritance of this class rebuilt the full icon 
> cache at the first boot.
> * With this patch the icon cache will only be build once at the first boot 
> and on pkg installations that require it.
> * This patch reduces the time needed for the first boot from 96 minutes to 5 
> minutes on the test machine.
> * Build-tested incremental (BB_SIGNATURE_HANDLER = "OEBasicHash") & from 
> scratch
> * Run-tested with systemd and opkg
> 
> Signed-off-by: Samuel Stirtzel <[email protected]>
> Signed-off-by: Andreas Müller <[email protected]>
> ---
>  meta/classes/gtk-icon-cache.bbclass                |   19 +++++++++-------
>  .../gtk+/gtk-update-icon-cache-runonce.bb          |   23 
> ++++++++++++++++++++
>  .../gtk-update-icon-cache-runonce.in               |   16 +++++++++++++
>  3 files changed, 50 insertions(+), 8 deletions(-)
>  create mode 100644 meta/recipes-gnome/gtk+/gtk-update-icon-cache-runonce.bb
>  create mode 100644 
> meta/recipes-gnome/gtk+/gtk-update-icon-cache-runonce/gtk-update-icon-cache-runonce.in
> 
> diff --git a/meta/classes/gtk-icon-cache.bbclass 
> b/meta/classes/gtk-icon-cache.bbclass
> index 60e3401..b48aabe 100644
> --- a/meta/classes/gtk-icon-cache.bbclass
> +++ b/meta/classes/gtk-icon-cache.bbclass
> @@ -9,14 +9,16 @@ 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
> -    if [ -d $icondir ] ; then
> -        gtk-update-icon-cache -fqt  $icondir
> -    fi
> -done
> +# do not execute in case a final run-once is waiting
> +if [ ! -e ${sysconfdir}/init.d/gtk-update-icon-cache-runonce ]; then
> +    # 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
> +        if [ -d $icondir ] ; then
> +            gtk-update-icon-cache -fqt  $icondir
> +        fi
> +    done
> +fi


Can't we just reduce this to adding a "touch
${sysconfdir}/init.d/gtk-update-icon-cache-runonce" to the above code
and then clear that file at boot time?

Cheers,

Richard


_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to