[poky] post-image-creation postinsts

Mark Hatle mark.hatle at windriver.com
Mon May 2 08:31:11 PDT 2011


There is a variable that you can set specific commands to be executed post fs
creation, pre-packaging:

ROOTFS_POSTPROCESS_COMMAND

There is a catch with this and the item below.  In the case of a field upgrade,
the code is currently written to cause a refresh of the icon cache.  Assuming
this is desired behavior, then you would need to preserve existing behavior
(other then first boot) as well as add the new behavior for the rootfs post
process command.

NOTE: As far as I am aware, all of the rootfs class types [deb, rpm, and ipk]
run the post-install scripts as a unit -AFTER- the filesystem has been created.
 So if the cache can be generated on the host system, then there is no reason to
have the 'exit 1' in the code below -- and the use of ROOTFS_POSTPROCESS_COMMAND
is not needed.

(I have not investigated the pixbufloader items, but I would assume based on
experience with other caching programs, that it would need to be modified to
understand the sysroot environment and be able to cache the path names as they
would appear on the target and not on the host.  If we corrected this issues,
and provided a native version of the cache program -- we could likely resolve
this with a simply host app.)

--Mark


On 5/2/11 10:12 AM, Colin Walters wrote:
> Hi,
> 
> 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?
> _______________________________________________
> poky mailing list
> poky at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky




More information about the poky mailing list