[poky] post-image-creation postinsts

Richard Purdie richard.purdie at linuxfoundation.org
Tue May 3 03:36:51 PDT 2011


On Mon, 2011-05-02 at 11:12 -0400, Colin Walters wrote:
> Currently from poky-bernard-5.0, in gdk-pixbuf_2.22.1.bb, we have:
> 
> postinst_pixbufloader () {
> if [ "x$D" != "x" ]; then
>     exit 1
> fi
> 
> GDK_PIXBUF_MODULEDIR=${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders
> gdk-pixbuf-query-loaders --update-cache
> 
> test -x ${bindir}/gtk-update-icon-cache && gtk-update-icon-cache  -q
> ${datadir}/icons/hicolor
> }
> 
> This results in a first-boot icon cache query in my image, which is
> pretty lame since we could equally well do this after the image is
> generated, and not on every computer that boots the image.
> 
> It seems to me we could add some mechanism for mounting the image
> filesystem and running a script in there (guestfs?), or maybe an
> automated QEMU boot, run the postinsts, and sync/shutdown?
> 
> Thoughts?

The lines at the top:

if [ "x$D" != "x" ]; then
    exit 1
fi

force the script to run on the target device. If there is a way to run
this at image generation time (cross safe), tell us what it is and we
can make it happen at image generation time!

(postinstalls are run at image generation time with $D set to the
directory containing the image).

Cheers,

Richard




More information about the poky mailing list