Patchwork opkg: Update svn 625 -> 633 and fix preinst issues

login
register
mail settings
Submitter Richard Purdie
Date Dec. 17, 2011, 11:52 a.m.
Message ID <1324122745.4568.136.camel@ted>
Download mbox | patch
Permalink /patch/17183/
State New
Headers show

Comments

Richard Purdie - Dec. 17, 2011, 11:52 a.m.
On Sat, 2011-12-17 at 11:34 +0100, Martin Jansa wrote:
> On Sat, Dec 17, 2011 at 10:22:01AM +0000, Richard Purdie wrote:
> > On Sat, 2011-12-17 at 10:20 +0100, Martin Jansa wrote:
> > > On Sat, Dec 17, 2011 at 01:32:28AM +0000, Richard Purdie wrote:
> > > I've tried to build image with SRCREV=633 and it built image fine
> > > then I tried to apply your patch but without installorder.patch to
> > > confirm that the issue with circular depending packages is really cause
> > > by that only and then try to fix installorder.patch to work even with
> > > such packages, but I got many postinst errors :(. 
> > > 
> > > From your description I understood that postinst execution should be
> > > almost the same only more logic is moved from rootfs_ipk.bbclass to opkg
> > > itself.
> > > 
> > > | Collected errors:
> > > |  * pkg_run_script: package "pam-plugin-unix" postinst script returned status 1.
> > > |  * opkg_configure: pam-plugin-unix.postinst returned 1.
> > > |  * pkg_run_script: package "pango-module-basic-x" postinst script returned status 1.
> > > |  * opkg_configure: pango-module-basic-x.postinst returned 1.
> > > |  * pkg_run_script: package "pango-module-basic-fc" postinst script returned status 1.
> > > |  * opkg_configure: pango-module-basic-fc.postinst returned 1.
> > > |  * pkg_run_script: package "update-modules" postinst script returned status 1.
> > > |  * opkg_configure: update-modules.postinst returned 1.
> > > |  * pkg_run_script: package "gdk-pixbuf-loader-png" postinst script returned status 1.
> > > |  * opkg_configure: gdk-pixbuf-loader-png.postinst returned 1.
> > > |  * pkg_run_script: package "gdk-pixbuf-loader-jpeg" postinst script returned status 1.
> > > |  * opkg_configure: gdk-pixbuf-loader-jpeg.postinst returned 1.
> > > |  * pkg_run_script: package "liberation-fonts" postinst script returned status 1.
> > > |  * opkg_configure: liberation-fonts.postinst returned 1.
> > > |  * pkg_run_script: package "gdk-pixbuf-loader-xpm" postinst script returned status 1.
> > > |  * opkg_configure: gdk-pixbuf-loader-xpm.postinst returned 1.
> > > |  * pkg_run_script: package "gdk-pixbuf-loader-gif" postinst script returned status 1.
> > > |  * opkg_configure: gdk-pixbuf-loader-gif.postinst returned 1.
> > > |  * pkg_run_script: package "ppp" postinst script returned status 1.
> > > |  * opkg_configure: ppp.postinst returned 1.
> > > |  * pkg_run_script: package "ttf-dejavu-common" postinst script returned status 127.
> > > |  * opkg_configure: ttf-dejavu-common.postinst returned 127.
> > > |  * pkg_run_script: package "ttf-dejavu-sans" postinst script returned status 127.
> > > |  * opkg_configure: ttf-dejavu-sans.postinst returned 127.
> > > |  * pkg_run_script: package "ffalarms" postinst script returned status 127.
> > > |  * opkg_configure: ffalarms.postinst returned 127.
> > > |  * pkg_run_script: package "rsyslog" postinst script returned status 1.
> > > |  * opkg_configure: rsyslog.postinst returned 1.
> > > |  * pkg_run_script: package "ttf-dejavu-sans-mono" postinst script returned status 127.
> > > |  * opkg_configure: ttf-dejavu-sans-mono.postinst returned 127.
> > > |  * pkg_run_script: package "matchbox-keyboard-im" postinst script returned status 1.
> > > |  * opkg_configure: matchbox-keyboard-im.postinst returned 1.
> > > |  * pkg_run_script: package "hicolor-icon-theme" postinst script returned status 1.
> > > |  * opkg_configure: hicolor-icon-theme.postinst returned 1.
> > > |  * pkg_run_script: packaERROR: Function 'do_rootfs' failed (see /OE/shr-core/tmp-eglibc/work/qemuarm-oe-linux-gnueabi/shr-l
> > > ite-image/2.0-r20/temp/log.do_rootfs.10063 for further information)
> > > | ge "ttf-liberation-mono" postinst script returned status 127.
> > > |  * opkg_configure: ttf-liberation-mono.postinst returned 127.
> > > |  * pkg_run_script: package "gtk-immodule-xim" postinst script returned status 1.
> > > |  * opkg_configure: gtk-immodule-xim.postinst returned 1.
> > > |  * pkg_run_script: package "ca-certificates" postinst script returned status 1.
> > > |  * opkg_configure: ca-certificates.postinst returned 1.
> > > NOTE: package shr-lite-image-2.0-r20: task do_rootfs: Failed
> > > ERROR: Task 9 (/OE/shr-core/meta-smartphone/meta-shr/recipes-shr/images/shr-lite-image.bb, do_rootfs) failed with exit code '
> > > 1'
> > 
> > This looks like you don't have the offline_postinstall patch applied?
> 
> I have

Please double check. That patch does things like:

and these are clearly showing up as ERRORs above. This means that:

a) offline_root isn't set (extremely unlikely for do_rootfs to work)
b) the patch isn't applied

> > opkg revision 633 will not build correct metadata without the patches
> > included.
> 
> Only patch not included in my opkg build was the installorder one.

I have my doubts about this, sorry...
 
> > > > The question is whether circular depends are something opkg should
> > > > support or not? What's debian's behaviour in that regard?
> > > 
> > > Well, it did work before and from quick search it looks that such circular dependencies are 
> > > quite common in our metadata.
> > 
> > Do you have some examples? I couldn't find any in OE-Core?
> 
> I'll try.
> 
> > >  So I agree that this patch is really needed to fix dbus owner,
> > > but in case there is circular dependency we shouldn't be so strict about order of installs.
> > 
> > So how you you handle A depends on B which depends on A and be strict
> > about dependency order?
> 
> The problem with dbus/base-passwd can be fixed by this patch, but for
> fsogsmd* modules the order is not so important, so I think that when there
> is circular dependency detected the order _shouldn't_ be so strict and
> maybe warning can be shown, but it shouldn't be fatal.

Looking at fsogsmd, that specific packages split doesn't really make
sense. fsogsmd depends on fsogsmd-connman and fsogsmd-connman depends on
fsogsmd. This means that both or neither can be installed but never
either of them singly so the split is just a waste of space.

I agree we need to improve that patch to detect loops but I'm not sure a
warning makes sense as we can't tell the difference between a case where
we don't care and a case where the resulting image is corrupt...

Cheers,

Richard
Martin Jansa - Dec. 17, 2011, 3:47 p.m.
On Sat, Dec 17, 2011 at 11:52:25AM +0000, Richard Purdie wrote:
> On Sat, 2011-12-17 at 11:34 +0100, Martin Jansa wrote:
> > On Sat, Dec 17, 2011 at 10:22:01AM +0000, Richard Purdie wrote:
> > > On Sat, 2011-12-17 at 10:20 +0100, Martin Jansa wrote:
> > > > On Sat, Dec 17, 2011 at 01:32:28AM +0000, Richard Purdie wrote:
> > > > I've tried to build image with SRCREV=633 and it built image fine
> > > > then I tried to apply your patch but without installorder.patch to
> > > > confirm that the issue with circular depending packages is really cause
> > > > by that only and then try to fix installorder.patch to work even with
> > > > such packages, but I got many postinst errors :(. 
> > > > 
> > > > From your description I understood that postinst execution should be
> > > > almost the same only more logic is moved from rootfs_ipk.bbclass to opkg
> > > > itself.
> > > > 
> > > > | Collected errors:
> > > > |  * pkg_run_script: package "pam-plugin-unix" postinst script returned status 1.
> > > > |  * opkg_configure: pam-plugin-unix.postinst returned 1.
> > > > |  * pkg_run_script: package "pango-module-basic-x" postinst script returned status 1.
> > > > |  * opkg_configure: pango-module-basic-x.postinst returned 1.
> > > > |  * pkg_run_script: package "pango-module-basic-fc" postinst script returned status 1.
> > > > |  * opkg_configure: pango-module-basic-fc.postinst returned 1.
> > > > |  * pkg_run_script: package "update-modules" postinst script returned status 1.
> > > > |  * opkg_configure: update-modules.postinst returned 1.
> > > > |  * pkg_run_script: package "gdk-pixbuf-loader-png" postinst script returned status 1.
> > > > |  * opkg_configure: gdk-pixbuf-loader-png.postinst returned 1.
> > > > |  * pkg_run_script: package "gdk-pixbuf-loader-jpeg" postinst script returned status 1.
> > > > |  * opkg_configure: gdk-pixbuf-loader-jpeg.postinst returned 1.
> > > > |  * pkg_run_script: package "liberation-fonts" postinst script returned status 1.
> > > > |  * opkg_configure: liberation-fonts.postinst returned 1.
> > > > |  * pkg_run_script: package "gdk-pixbuf-loader-xpm" postinst script returned status 1.
> > > > |  * opkg_configure: gdk-pixbuf-loader-xpm.postinst returned 1.
> > > > |  * pkg_run_script: package "gdk-pixbuf-loader-gif" postinst script returned status 1.
> > > > |  * opkg_configure: gdk-pixbuf-loader-gif.postinst returned 1.
> > > > |  * pkg_run_script: package "ppp" postinst script returned status 1.
> > > > |  * opkg_configure: ppp.postinst returned 1.
> > > > |  * pkg_run_script: package "ttf-dejavu-common" postinst script returned status 127.
> > > > |  * opkg_configure: ttf-dejavu-common.postinst returned 127.
> > > > |  * pkg_run_script: package "ttf-dejavu-sans" postinst script returned status 127.
> > > > |  * opkg_configure: ttf-dejavu-sans.postinst returned 127.
> > > > |  * pkg_run_script: package "ffalarms" postinst script returned status 127.
> > > > |  * opkg_configure: ffalarms.postinst returned 127.
> > > > |  * pkg_run_script: package "rsyslog" postinst script returned status 1.
> > > > |  * opkg_configure: rsyslog.postinst returned 1.
> > > > |  * pkg_run_script: package "ttf-dejavu-sans-mono" postinst script returned status 127.
> > > > |  * opkg_configure: ttf-dejavu-sans-mono.postinst returned 127.
> > > > |  * pkg_run_script: package "matchbox-keyboard-im" postinst script returned status 1.
> > > > |  * opkg_configure: matchbox-keyboard-im.postinst returned 1.
> > > > |  * pkg_run_script: package "hicolor-icon-theme" postinst script returned status 1.
> > > > |  * opkg_configure: hicolor-icon-theme.postinst returned 1.
> > > > |  * pkg_run_script: packaERROR: Function 'do_rootfs' failed (see /OE/shr-core/tmp-eglibc/work/qemuarm-oe-linux-gnueabi/shr-l
> > > > ite-image/2.0-r20/temp/log.do_rootfs.10063 for further information)
> > > > | ge "ttf-liberation-mono" postinst script returned status 127.
> > > > |  * opkg_configure: ttf-liberation-mono.postinst returned 127.
> > > > |  * pkg_run_script: package "gtk-immodule-xim" postinst script returned status 1.
> > > > |  * opkg_configure: gtk-immodule-xim.postinst returned 1.
> > > > |  * pkg_run_script: package "ca-certificates" postinst script returned status 1.
> > > > |  * opkg_configure: ca-certificates.postinst returned 1.
> > > > NOTE: package shr-lite-image-2.0-r20: task do_rootfs: Failed
> > > > ERROR: Task 9 (/OE/shr-core/meta-smartphone/meta-shr/recipes-shr/images/shr-lite-image.bb, do_rootfs) failed with exit code '
> > > > 1'
> > > 
> > > This looks like you don't have the offline_postinstall patch applied?
> > 
> > I have
> 
> Please double check. That patch does things like:
> 
> Index: trunk/libopkg/pkg.c
> ===================================================================
> --- trunk.orig/libopkg/pkg.c	2011-12-15 15:58:39.000000000 +0000
> +++ trunk/libopkg/pkg.c	2011-12-15 20:04:50.109992736 +0000
> @@ -1297,8 +1297,9 @@
>       free(cmd);
>  
>       if (err) {
> -	  opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n", 
> -               pkg->name, script, err);
> +          if (!conf->offline_root)
> +	       opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n", 
> +                    pkg->name, script, err);
>  	  return err;
>       }
>  
> and these are clearly showing up as ERRORs above. This means that:
> 
> a) offline_root isn't set (extremely unlikely for do_rootfs to work)
> b) the patch isn't applied
> 
> > > opkg revision 633 will not build correct metadata without the patches
> > > included.
> > 
> > Only patch not included in my opkg build was the installorder one.
> 
> I have my doubts about this, sorry...
>  
> > > > > The question is whether circular depends are something opkg should
> > > > > support or not? What's debian's behaviour in that regard?
> > > > 
> > > > Well, it did work before and from quick search it looks that such circular dependencies are 
> > > > quite common in our metadata.
> > > 
> > > Do you have some examples? I couldn't find any in OE-Core?
> > 
> > I'll try.
> > 
> > > >  So I agree that this patch is really needed to fix dbus owner,
> > > > but in case there is circular dependency we shouldn't be so strict about order of installs.
> > > 
> > > So how you you handle A depends on B which depends on A and be strict
> > > about dependency order?
> > 
> > The problem with dbus/base-passwd can be fixed by this patch, but for
> > fsogsmd* modules the order is not so important, so I think that when there
> > is circular dependency detected the order _shouldn't_ be so strict and
> > maybe warning can be shown, but it shouldn't be fatal.
> 
> Looking at fsogsmd, that specific packages split doesn't really make
> sense. fsogsmd depends on fsogsmd-connman and fsogsmd-connman depends on
> fsogsmd. This means that both or neither can be installed but never
> either of them singly so the split is just a waste of space.
> 
> I agree we need to improve that patch to detect loops but I'm not sure a
> warning makes sense as we can't tell the difference between a case where
> we don't care and a case where the resulting image is corrupt...

You're right, it doesn't make much sense in this case (maybe fsogsmd-connman 
wasn't linked to libfsogsmd before so it didn't had circular dependency before),
but for example fsogsmd-config is machine specific and pulls only right set
of modules for each device. So it cannot be merged together as easy as this.

I'm changing RDEPENDS to RRECOMMENDS to break this hard dependency and build image.

Cheers,
Martin Jansa - Dec. 18, 2011, 11 a.m.
On Sat, Dec 17, 2011 at 11:52:25AM +0000, Richard Purdie wrote:
> On Sat, 2011-12-17 at 11:34 +0100, Martin Jansa wrote:
> > On Sat, Dec 17, 2011 at 10:22:01AM +0000, Richard Purdie wrote:
> > > On Sat, 2011-12-17 at 10:20 +0100, Martin Jansa wrote:
> > > > On Sat, Dec 17, 2011 at 01:32:28AM +0000, Richard Purdie wrote:
> > > > I've tried to build image with SRCREV=633 and it built image fine
> > > > then I tried to apply your patch but without installorder.patch to
> > > > confirm that the issue with circular depending packages is really cause
> > > > by that only and then try to fix installorder.patch to work even with
> > > > such packages, but I got many postinst errors :(. 
> > > > 
> > > > From your description I understood that postinst execution should be
> > > > almost the same only more logic is moved from rootfs_ipk.bbclass to opkg
> > > > itself.
> > > > 
> > > > | Collected errors:
> > > > |  * pkg_run_script: package "pam-plugin-unix" postinst script returned status 1.
> > > > |  * opkg_configure: pam-plugin-unix.postinst returned 1.
> > > > |  * pkg_run_script: package "pango-module-basic-x" postinst script returned status 1.
> > > > |  * opkg_configure: pango-module-basic-x.postinst returned 1.
> > > > |  * pkg_run_script: package "pango-module-basic-fc" postinst script returned status 1.
> > > > |  * opkg_configure: pango-module-basic-fc.postinst returned 1.
> > > > |  * pkg_run_script: package "update-modules" postinst script returned status 1.
> > > > |  * opkg_configure: update-modules.postinst returned 1.
> > > > |  * pkg_run_script: package "gdk-pixbuf-loader-png" postinst script returned status 1.
> > > > |  * opkg_configure: gdk-pixbuf-loader-png.postinst returned 1.
> > > > |  * pkg_run_script: package "gdk-pixbuf-loader-jpeg" postinst script returned status 1.
> > > > |  * opkg_configure: gdk-pixbuf-loader-jpeg.postinst returned 1.
> > > > |  * pkg_run_script: package "liberation-fonts" postinst script returned status 1.
> > > > |  * opkg_configure: liberation-fonts.postinst returned 1.
> > > > |  * pkg_run_script: package "gdk-pixbuf-loader-xpm" postinst script returned status 1.
> > > > |  * opkg_configure: gdk-pixbuf-loader-xpm.postinst returned 1.
> > > > |  * pkg_run_script: package "gdk-pixbuf-loader-gif" postinst script returned status 1.
> > > > |  * opkg_configure: gdk-pixbuf-loader-gif.postinst returned 1.
> > > > |  * pkg_run_script: package "ppp" postinst script returned status 1.
> > > > |  * opkg_configure: ppp.postinst returned 1.
> > > > |  * pkg_run_script: package "ttf-dejavu-common" postinst script returned status 127.
> > > > |  * opkg_configure: ttf-dejavu-common.postinst returned 127.
> > > > |  * pkg_run_script: package "ttf-dejavu-sans" postinst script returned status 127.
> > > > |  * opkg_configure: ttf-dejavu-sans.postinst returned 127.
> > > > |  * pkg_run_script: package "ffalarms" postinst script returned status 127.
> > > > |  * opkg_configure: ffalarms.postinst returned 127.
> > > > |  * pkg_run_script: package "rsyslog" postinst script returned status 1.
> > > > |  * opkg_configure: rsyslog.postinst returned 1.
> > > > |  * pkg_run_script: package "ttf-dejavu-sans-mono" postinst script returned status 127.
> > > > |  * opkg_configure: ttf-dejavu-sans-mono.postinst returned 127.
> > > > |  * pkg_run_script: package "matchbox-keyboard-im" postinst script returned status 1.
> > > > |  * opkg_configure: matchbox-keyboard-im.postinst returned 1.
> > > > |  * pkg_run_script: package "hicolor-icon-theme" postinst script returned status 1.
> > > > |  * opkg_configure: hicolor-icon-theme.postinst returned 1.
> > > > |  * pkg_run_script: packaERROR: Function 'do_rootfs' failed (see /OE/shr-core/tmp-eglibc/work/qemuarm-oe-linux-gnueabi/shr-l
> > > > ite-image/2.0-r20/temp/log.do_rootfs.10063 for further information)
> > > > | ge "ttf-liberation-mono" postinst script returned status 127.
> > > > |  * opkg_configure: ttf-liberation-mono.postinst returned 127.
> > > > |  * pkg_run_script: package "gtk-immodule-xim" postinst script returned status 1.
> > > > |  * opkg_configure: gtk-immodule-xim.postinst returned 1.
> > > > |  * pkg_run_script: package "ca-certificates" postinst script returned status 1.
> > > > |  * opkg_configure: ca-certificates.postinst returned 1.
> > > > NOTE: package shr-lite-image-2.0-r20: task do_rootfs: Failed
> > > > ERROR: Task 9 (/OE/shr-core/meta-smartphone/meta-shr/recipes-shr/images/shr-lite-image.bb, do_rootfs) failed with exit code '
> > > > 1'
> > > 
> > > This looks like you don't have the offline_postinstall patch applied?
> > 
> > I have
> 
> Please double check. That patch does things like:
> 
> Index: trunk/libopkg/pkg.c
> ===================================================================
> --- trunk.orig/libopkg/pkg.c	2011-12-15 15:58:39.000000000 +0000
> +++ trunk/libopkg/pkg.c	2011-12-15 20:04:50.109992736 +0000
> @@ -1297,8 +1297,9 @@
>       free(cmd);
>  
>       if (err) {
> -	  opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n", 
> -               pkg->name, script, err);
> +          if (!conf->offline_root)
> +	       opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n", 
> +                    pkg->name, script, err);
>  	  return err;
>       }
>  
> and these are clearly showing up as ERRORs above. This means that:
> 
> a) offline_root isn't set (extremely unlikely for do_rootfs to work)
> b) the patch isn't applied
> 
> > > opkg revision 633 will not build correct metadata without the patches
> > > included.
> > 
> > Only patch not included in my opkg build was the installorder one.
> 
> I have my doubts about this, sorry...

With runtime circular dependencies broken by RRECOMMENDS I managed to
build an image, but there is problem in target opkg

$D is not empty anymore (it's set to /), so all postinst scripts are
executing the variant for do_rootfs not for target, e.g.

Configuring opkg.
//var/lib/opkg/info/opkg.postinst: line 3: install: command not found
update-alternatives: Linking //usr/bin/opkg to /usr/bin/opkg-cl
Configuring kernel-module-fat.
//var/lib/opkg/info/kernel-module-fat.postinst: line 3: arm-oe-linux-gnueabi-depmod: command not found
 
>  
> > > > > The question is whether circular depends are something opkg should
> > > > > support or not? What's debian's behaviour in that regard?
> > > > 
> > > > Well, it did work before and from quick search it looks that such circular dependencies are 
> > > > quite common in our metadata.
> > > 
> > > Do you have some examples? I couldn't find any in OE-Core?
> > 
> > I'll try.
> > 
> > > >  So I agree that this patch is really needed to fix dbus owner,
> > > > but in case there is circular dependency we shouldn't be so strict about order of installs.
> > > 
> > > So how you you handle A depends on B which depends on A and be strict
> > > about dependency order?
> > 
> > The problem with dbus/base-passwd can be fixed by this patch, but for
> > fsogsmd* modules the order is not so important, so I think that when there
> > is circular dependency detected the order _shouldn't_ be so strict and
> > maybe warning can be shown, but it shouldn't be fatal.
> 
> Looking at fsogsmd, that specific packages split doesn't really make
> sense. fsogsmd depends on fsogsmd-connman and fsogsmd-connman depends on
> fsogsmd. This means that both or neither can be installed but never
> either of them singly so the split is just a waste of space.
> 
> I agree we need to improve that patch to detect loops but I'm not sure a
> warning makes sense as we can't tell the difference between a case where
> we don't care and a case where the resulting image is corrupt...
> 
> Cheers,
> 
> Richard
> 
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Andreas Müller - Dec. 18, 2011, 11:44 a.m.
On Sunday, December 18, 2011 12:00:42 PM Martin Jansa wrote:
> On Sat, Dec 17, 2011 at 11:52:25AM +0000, Richard Purdie wrote:
> > On Sat, 2011-12-17 at 11:34 +0100, Martin Jansa wrote:
> > > On Sat, Dec 17, 2011 at 10:22:01AM +0000, Richard Purdie wrote:
> > > > On Sat, 2011-12-17 at 10:20 +0100, Martin Jansa wrote:
> > > > > On Sat, Dec 17, 2011 at 01:32:28AM +0000, Richard Purdie wrote:
> > > > > I've tried to build image with SRCREV=633 and it built image fine
> > > > > then I tried to apply your patch but without installorder.patch to
> > > > > confirm that the issue with circular depending packages is really
> > > > > cause by that only and then try to fix installorder.patch to work
> > > > > even with such packages, but I got many postinst errors :(.
> > > > > 
> > > > > From your description I understood that postinst execution should
> > > > > be almost the same only more logic is moved from
> > > > > rootfs_ipk.bbclass to opkg itself.
> > > > > 
> > > > > | Collected errors:
> > > > > |  * pkg_run_script: package "pam-plugin-unix" postinst script
> > > > > |  returned status 1. * opkg_configure: pam-plugin-unix.postinst
> > > > > |  returned 1.
> > > > > |  * pkg_run_script: package "pango-module-basic-x" postinst script
> > > > > |  returned status 1. * opkg_configure:
> > > > > |  pango-module-basic-x.postinst returned 1. * pkg_run_script:
> > > > > |  package "pango-module-basic-fc" postinst script returned status
> > > > > |  1. * opkg_configure: pango-module-basic-fc.postinst returned 1.
> > > > > |  * pkg_run_script: package "update-modules" postinst script
> > > > > |  returned status 1. * opkg_configure: update-modules.postinst
> > > > > |  returned 1.
> > > > > |  * pkg_run_script: package "gdk-pixbuf-loader-png" postinst
> > > > > |  script returned status 1. * opkg_configure:
> > > > > |  gdk-pixbuf-loader-png.postinst returned 1. * pkg_run_script:
> > > > > |  package "gdk-pixbuf-loader-jpeg" postinst script returned
> > > > > |  status 1. * opkg_configure: gdk-pixbuf-loader-jpeg.postinst
> > > > > |  returned 1. * pkg_run_script: package "liberation-fonts"
> > > > > |  postinst script returned status 1. * opkg_configure:
> > > > > |  liberation-fonts.postinst returned 1. * pkg_run_script: package
> > > > > |  "gdk-pixbuf-loader-xpm" postinst script returned status 1. *
> > > > > |  opkg_configure: gdk-pixbuf-loader-xpm.postinst returned 1. *
> > > > > |  pkg_run_script: package "gdk-pixbuf-loader-gif" postinst script
> > > > > |  returned status 1. * opkg_configure:
> > > > > |  gdk-pixbuf-loader-gif.postinst returned 1. * pkg_run_script:
> > > > > |  package "ppp" postinst script returned status 1. *
> > > > > |  opkg_configure: ppp.postinst returned 1.
> > > > > |  * pkg_run_script: package "ttf-dejavu-common" postinst script
> > > > > |  returned status 127. * opkg_configure:
> > > > > |  ttf-dejavu-common.postinst returned 127. * pkg_run_script:
> > > > > |  package "ttf-dejavu-sans" postinst script returned status 127.
> > > > > |  * opkg_configure: ttf-dejavu-sans.postinst returned 127. *
> > > > > |  pkg_run_script: package "ffalarms" postinst script returned
> > > > > |  status 127. * opkg_configure: ffalarms.postinst returned 127.
> > > > > |  * pkg_run_script: package "rsyslog" postinst script returned
> > > > > |  status 1. * opkg_configure: rsyslog.postinst returned 1.
> > > > > |  * pkg_run_script: package "ttf-dejavu-sans-mono" postinst script
> > > > > |  returned status 127. * opkg_configure:
> > > > > |  ttf-dejavu-sans-mono.postinst returned 127. * pkg_run_script:
> > > > > |  package "matchbox-keyboard-im" postinst script returned status
> > > > > |  1. * opkg_configure: matchbox-keyboard-im.postinst returned 1.
> > > > > |  * pkg_run_script: package "hicolor-icon-theme" postinst script
> > > > > |  returned status 1. * opkg_configure:
> > > > > |  hicolor-icon-theme.postinst returned 1. * pkg_run_script:
> > > > > |  packaERROR: Function 'do_rootfs' failed (see
> > > > > |  /OE/shr-core/tmp-eglibc/work/qemuarm-oe-linux-gnueabi/shr-l
> > > > > 
> > > > > ite-image/2.0-r20/temp/log.do_rootfs.10063 for further information)
> > > > > 
> > > > > | ge "ttf-liberation-mono" postinst script returned status 127.
> > > > > | 
> > > > > |  * opkg_configure: ttf-liberation-mono.postinst returned 127.
> > > > > |  * pkg_run_script: package "gtk-immodule-xim" postinst script
> > > > > |  returned status 1. * opkg_configure: gtk-immodule-xim.postinst
> > > > > |  returned 1. * pkg_run_script: package "ca-certificates"
> > > > > |  postinst script returned status 1. * opkg_configure:
> > > > > |  ca-certificates.postinst returned 1.
> > > > > 
> > > > > NOTE: package shr-lite-image-2.0-r20: task do_rootfs: Failed
> > > > > ERROR: Task 9
> > > > > (/OE/shr-core/meta-smartphone/meta-shr/recipes-shr/images/shr-lite
> > > > > -image.bb, do_rootfs) failed with exit code ' 1'
> > > > 
> > > > This looks like you don't have the offline_postinstall patch applied?
> > > 
> > > I have
> > 
> > Please double check. That patch does things like:
> > 
> > Index: trunk/libopkg/pkg.c
> > ===================================================================
> > --- trunk.orig/libopkg/pkg.c	2011-12-15 15:58:39.000000000 +0000
> > +++ trunk/libopkg/pkg.c	2011-12-15 20:04:50.109992736 +0000
> > @@ -1297,8 +1297,9 @@
> > 
> >       free(cmd);
> >       
> >       if (err) {
> > 
> > -	  opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n",
> > -               pkg->name, script, err);
> > +          if (!conf->offline_root)
> > +	       opkg_msg(ERROR, "package \"%s\" %s script returned status
> > %d.\n", +                    pkg->name, script, err);
> > 
> >  	  return err;
> >  	  
> >       }
> > 
> > and these are clearly showing up as ERRORs above. This means that:
> > 
> > a) offline_root isn't set (extremely unlikely for do_rootfs to work)
> > b) the patch isn't applied
> > 
> > > > opkg revision 633 will not build correct metadata without the patches
> > > > included.
> > > 
> > > Only patch not included in my opkg build was the installorder one.
> > 
> > I have my doubts about this, sorry...
> 
> With runtime circular dependencies broken by RRECOMMENDS I managed to
> build an image, but there is problem in target opkg
> 
> $D is not empty anymore (it's set to /), so all postinst scripts are
> executing the variant for do_rootfs not for target, e.g.
> 
> Configuring opkg.
> //var/lib/opkg/info/opkg.postinst: line 3: install: command not found
> update-alternatives: Linking //usr/bin/opkg to /usr/bin/opkg-cl
> Configuring kernel-module-fat.
> //var/lib/opkg/info/kernel-module-fat.postinst: line 3:
> arm-oe-linux-gnueabi-depmod: command not found
> 
Apart from circular dependencies my experiences with this patch is:

1. dbus dir ownership: Most ownerships are correct now. Only /var/run/dbus is 
still root:root ( at angstrom with custom fs-perms ).

2. First boot is VERY fast now. Not that I have a problem with being fast - but 
I see many lines like
| S98configure[77]: * pkg_run_script: package "update-modules" postinst script 
returned status 1.
| S98configure[77]: * opkg_configure: update-modules.postinst returned 1.
| S98configure[77]: * pkg_run_script: package "hicolor-icon-theme" postinst 
script returned status 1.
| S98configure[77]: * opkg_configure: hicolor-icon-theme.postinst returned 1.
| S98configure[77]: * pkg_run_script: package "pango-module-basic-x" postinst 
script returned status 1.
| S98configure[77]: * opkg_configure: pango-module-basic-x.postinst returned 1.
Many (all?) of these packages do not extend postinst.

3. xfce gui I usually use is far from working (only mouse pointer that's it)

Andreas
Martin Jansa - Dec. 18, 2011, 12:09 p.m.
On Sun, Dec 18, 2011 at 12:44:47PM +0100, Andreas Müller wrote:
> On Sunday, December 18, 2011 12:00:42 PM Martin Jansa wrote:
> > On Sat, Dec 17, 2011 at 11:52:25AM +0000, Richard Purdie wrote:
> > > On Sat, 2011-12-17 at 11:34 +0100, Martin Jansa wrote:
> > > > On Sat, Dec 17, 2011 at 10:22:01AM +0000, Richard Purdie wrote:
> > > > > On Sat, 2011-12-17 at 10:20 +0100, Martin Jansa wrote:
> > > > > > On Sat, Dec 17, 2011 at 01:32:28AM +0000, Richard Purdie wrote:
> > > > > > I've tried to build image with SRCREV=633 and it built image fine
> > > > > > then I tried to apply your patch but without installorder.patch to
> > > > > > confirm that the issue with circular depending packages is really
> > > > > > cause by that only and then try to fix installorder.patch to work
> > > > > > even with such packages, but I got many postinst errors :(.
> > > > > > 
> > > > > > From your description I understood that postinst execution should
> > > > > > be almost the same only more logic is moved from
> > > > > > rootfs_ipk.bbclass to opkg itself.
> > > > > > 
> > > > > > | Collected errors:
> > > > > > |  * pkg_run_script: package "pam-plugin-unix" postinst script
> > > > > > |  returned status 1. * opkg_configure: pam-plugin-unix.postinst
> > > > > > |  returned 1.
> > > > > > |  * pkg_run_script: package "pango-module-basic-x" postinst script
> > > > > > |  returned status 1. * opkg_configure:
> > > > > > |  pango-module-basic-x.postinst returned 1. * pkg_run_script:
> > > > > > |  package "pango-module-basic-fc" postinst script returned status
> > > > > > |  1. * opkg_configure: pango-module-basic-fc.postinst returned 1.
> > > > > > |  * pkg_run_script: package "update-modules" postinst script
> > > > > > |  returned status 1. * opkg_configure: update-modules.postinst
> > > > > > |  returned 1.
> > > > > > |  * pkg_run_script: package "gdk-pixbuf-loader-png" postinst
> > > > > > |  script returned status 1. * opkg_configure:
> > > > > > |  gdk-pixbuf-loader-png.postinst returned 1. * pkg_run_script:
> > > > > > |  package "gdk-pixbuf-loader-jpeg" postinst script returned
> > > > > > |  status 1. * opkg_configure: gdk-pixbuf-loader-jpeg.postinst
> > > > > > |  returned 1. * pkg_run_script: package "liberation-fonts"
> > > > > > |  postinst script returned status 1. * opkg_configure:
> > > > > > |  liberation-fonts.postinst returned 1. * pkg_run_script: package
> > > > > > |  "gdk-pixbuf-loader-xpm" postinst script returned status 1. *
> > > > > > |  opkg_configure: gdk-pixbuf-loader-xpm.postinst returned 1. *
> > > > > > |  pkg_run_script: package "gdk-pixbuf-loader-gif" postinst script
> > > > > > |  returned status 1. * opkg_configure:
> > > > > > |  gdk-pixbuf-loader-gif.postinst returned 1. * pkg_run_script:
> > > > > > |  package "ppp" postinst script returned status 1. *
> > > > > > |  opkg_configure: ppp.postinst returned 1.
> > > > > > |  * pkg_run_script: package "ttf-dejavu-common" postinst script
> > > > > > |  returned status 127. * opkg_configure:
> > > > > > |  ttf-dejavu-common.postinst returned 127. * pkg_run_script:
> > > > > > |  package "ttf-dejavu-sans" postinst script returned status 127.
> > > > > > |  * opkg_configure: ttf-dejavu-sans.postinst returned 127. *
> > > > > > |  pkg_run_script: package "ffalarms" postinst script returned
> > > > > > |  status 127. * opkg_configure: ffalarms.postinst returned 127.
> > > > > > |  * pkg_run_script: package "rsyslog" postinst script returned
> > > > > > |  status 1. * opkg_configure: rsyslog.postinst returned 1.
> > > > > > |  * pkg_run_script: package "ttf-dejavu-sans-mono" postinst script
> > > > > > |  returned status 127. * opkg_configure:
> > > > > > |  ttf-dejavu-sans-mono.postinst returned 127. * pkg_run_script:
> > > > > > |  package "matchbox-keyboard-im" postinst script returned status
> > > > > > |  1. * opkg_configure: matchbox-keyboard-im.postinst returned 1.
> > > > > > |  * pkg_run_script: package "hicolor-icon-theme" postinst script
> > > > > > |  returned status 1. * opkg_configure:
> > > > > > |  hicolor-icon-theme.postinst returned 1. * pkg_run_script:
> > > > > > |  packaERROR: Function 'do_rootfs' failed (see
> > > > > > |  /OE/shr-core/tmp-eglibc/work/qemuarm-oe-linux-gnueabi/shr-l
> > > > > > 
> > > > > > ite-image/2.0-r20/temp/log.do_rootfs.10063 for further information)
> > > > > > 
> > > > > > | ge "ttf-liberation-mono" postinst script returned status 127.
> > > > > > | 
> > > > > > |  * opkg_configure: ttf-liberation-mono.postinst returned 127.
> > > > > > |  * pkg_run_script: package "gtk-immodule-xim" postinst script
> > > > > > |  returned status 1. * opkg_configure: gtk-immodule-xim.postinst
> > > > > > |  returned 1. * pkg_run_script: package "ca-certificates"
> > > > > > |  postinst script returned status 1. * opkg_configure:
> > > > > > |  ca-certificates.postinst returned 1.
> > > > > > 
> > > > > > NOTE: package shr-lite-image-2.0-r20: task do_rootfs: Failed
> > > > > > ERROR: Task 9
> > > > > > (/OE/shr-core/meta-smartphone/meta-shr/recipes-shr/images/shr-lite
> > > > > > -image.bb, do_rootfs) failed with exit code ' 1'
> > > > > 
> > > > > This looks like you don't have the offline_postinstall patch applied?
> > > > 
> > > > I have
> > > 
> > > Please double check. That patch does things like:
> > > 
> > > Index: trunk/libopkg/pkg.c
> > > ===================================================================
> > > --- trunk.orig/libopkg/pkg.c	2011-12-15 15:58:39.000000000 +0000
> > > +++ trunk/libopkg/pkg.c	2011-12-15 20:04:50.109992736 +0000
> > > @@ -1297,8 +1297,9 @@
> > > 
> > >       free(cmd);
> > >       
> > >       if (err) {
> > > 
> > > -	  opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n",
> > > -               pkg->name, script, err);
> > > +          if (!conf->offline_root)
> > > +	       opkg_msg(ERROR, "package \"%s\" %s script returned status
> > > %d.\n", +                    pkg->name, script, err);
> > > 
> > >  	  return err;
> > >  	  
> > >       }
> > > 
> > > and these are clearly showing up as ERRORs above. This means that:
> > > 
> > > a) offline_root isn't set (extremely unlikely for do_rootfs to work)
> > > b) the patch isn't applied
> > > 
> > > > > opkg revision 633 will not build correct metadata without the patches
> > > > > included.
> > > > 
> > > > Only patch not included in my opkg build was the installorder one.
> > > 
> > > I have my doubts about this, sorry...
> > 
> > With runtime circular dependencies broken by RRECOMMENDS I managed to
> > build an image, but there is problem in target opkg
> > 
> > $D is not empty anymore (it's set to /), so all postinst scripts are
> > executing the variant for do_rootfs not for target, e.g.
> > 
> > Configuring opkg.
> > //var/lib/opkg/info/opkg.postinst: line 3: install: command not found
> > update-alternatives: Linking //usr/bin/opkg to /usr/bin/opkg-cl
> > Configuring kernel-module-fat.
> > //var/lib/opkg/info/kernel-module-fat.postinst: line 3:
> > arm-oe-linux-gnueabi-depmod: command not found
> > 
> Apart from circular dependencies my experiences with this patch is:
> 
> 1. dbus dir ownership: Most ownerships are correct now. Only /var/run/dbus is 
> still root:root ( at angstrom with custom fs-perms ).

after rebuilding dbus I even got some images with messagebus completely
missing in packaged /etc/group (and the helper owned by sshd or
somethig)

> 2. First boot is VERY fast now. Not that I have a problem with being fast - but 
> I see many lines like
> | S98configure[77]: * pkg_run_script: package "update-modules" postinst script 
> returned status 1.
> | S98configure[77]: * opkg_configure: update-modules.postinst returned 1.
> | S98configure[77]: * pkg_run_script: package "hicolor-icon-theme" postinst 
> script returned status 1.
> | S98configure[77]: * opkg_configure: hicolor-icon-theme.postinst returned 1.
> | S98configure[77]: * pkg_run_script: package "pango-module-basic-x" postinst 
> script returned status 1.
> | S98configure[77]: * opkg_configure: pango-module-basic-x.postinst returned 1.
> Many (all?) of these packages do not extend postinst.

this is probably cause by D=/ on target.. in contrib/jansa/test there is
untested patch for this, but I wont be available until tomorrow to
report if it works.
> 
> 3. xfce gui I usually use is far from working (only mouse pointer that's it)
> 
> Andreas
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Richard Purdie - Dec. 18, 2011, 11:59 p.m.
On Sun, 2011-12-18 at 12:44 +0100, Andreas Müller wrote:
> On Sunday, December 18, 2011 12:00:42 PM Martin Jansa wrote:
> > On Sat, Dec 17, 2011 at 11:52:25AM +0000, Richard Purdie wrote:
> > > On Sat, 2011-12-17 at 11:34 +0100, Martin Jansa wrote:
> > > > On Sat, Dec 17, 2011 at 10:22:01AM +0000, Richard Purdie wrote:
> > > > > On Sat, 2011-12-17 at 10:20 +0100, Martin Jansa wrote:
> > > > > > On Sat, Dec 17, 2011 at 01:32:28AM +0000, Richard Purdie wrote:
> > > > > > I've tried to build image with SRCREV=633 and it built image fine
> > > > > > then I tried to apply your patch but without installorder.patch to
> > > > > > confirm that the issue with circular depending packages is really
> > > > > > cause by that only and then try to fix installorder.patch to work
> > > > > > even with such packages, but I got many postinst errors :(.
> > > > > > 
> > > > > > From your description I understood that postinst execution should
> > > > > > be almost the same only more logic is moved from
> > > > > > rootfs_ipk.bbclass to opkg itself.
> > > > > > 
> > > > > > | Collected errors:
> > > > > > |  * pkg_run_script: package "pam-plugin-unix" postinst script
> > > > > > |  returned status 1. * opkg_configure: pam-plugin-unix.postinst
> > > > > > |  returned 1.
> > > > > > |  * pkg_run_script: package "pango-module-basic-x" postinst script
> > > > > > |  returned status 1. * opkg_configure:
> > > > > > |  pango-module-basic-x.postinst returned 1. * pkg_run_script:
> > > > > > |  package "pango-module-basic-fc" postinst script returned status
> > > > > > |  1. * opkg_configure: pango-module-basic-fc.postinst returned 1.
> > > > > > |  * pkg_run_script: package "update-modules" postinst script
> > > > > > |  returned status 1. * opkg_configure: update-modules.postinst
> > > > > > |  returned 1.
> > > > > > |  * pkg_run_script: package "gdk-pixbuf-loader-png" postinst
> > > > > > |  script returned status 1. * opkg_configure:
> > > > > > |  gdk-pixbuf-loader-png.postinst returned 1. * pkg_run_script:
> > > > > > |  package "gdk-pixbuf-loader-jpeg" postinst script returned
> > > > > > |  status 1. * opkg_configure: gdk-pixbuf-loader-jpeg.postinst
> > > > > > |  returned 1. * pkg_run_script: package "liberation-fonts"
> > > > > > |  postinst script returned status 1. * opkg_configure:
> > > > > > |  liberation-fonts.postinst returned 1. * pkg_run_script: package
> > > > > > |  "gdk-pixbuf-loader-xpm" postinst script returned status 1. *
> > > > > > |  opkg_configure: gdk-pixbuf-loader-xpm.postinst returned 1. *
> > > > > > |  pkg_run_script: package "gdk-pixbuf-loader-gif" postinst script
> > > > > > |  returned status 1. * opkg_configure:
> > > > > > |  gdk-pixbuf-loader-gif.postinst returned 1. * pkg_run_script:
> > > > > > |  package "ppp" postinst script returned status 1. *
> > > > > > |  opkg_configure: ppp.postinst returned 1.
> > > > > > |  * pkg_run_script: package "ttf-dejavu-common" postinst script
> > > > > > |  returned status 127. * opkg_configure:
> > > > > > |  ttf-dejavu-common.postinst returned 127. * pkg_run_script:
> > > > > > |  package "ttf-dejavu-sans" postinst script returned status 127.
> > > > > > |  * opkg_configure: ttf-dejavu-sans.postinst returned 127. *
> > > > > > |  pkg_run_script: package "ffalarms" postinst script returned
> > > > > > |  status 127. * opkg_configure: ffalarms.postinst returned 127.
> > > > > > |  * pkg_run_script: package "rsyslog" postinst script returned
> > > > > > |  status 1. * opkg_configure: rsyslog.postinst returned 1.
> > > > > > |  * pkg_run_script: package "ttf-dejavu-sans-mono" postinst script
> > > > > > |  returned status 127. * opkg_configure:
> > > > > > |  ttf-dejavu-sans-mono.postinst returned 127. * pkg_run_script:
> > > > > > |  package "matchbox-keyboard-im" postinst script returned status
> > > > > > |  1. * opkg_configure: matchbox-keyboard-im.postinst returned 1.
> > > > > > |  * pkg_run_script: package "hicolor-icon-theme" postinst script
> > > > > > |  returned status 1. * opkg_configure:
> > > > > > |  hicolor-icon-theme.postinst returned 1. * pkg_run_script:
> > > > > > |  packaERROR: Function 'do_rootfs' failed (see
> > > > > > |  /OE/shr-core/tmp-eglibc/work/qemuarm-oe-linux-gnueabi/shr-l
> > > > > > 
> > > > > > ite-image/2.0-r20/temp/log.do_rootfs.10063 for further information)
> > > > > > 
> > > > > > | ge "ttf-liberation-mono" postinst script returned status 127.
> > > > > > | 
> > > > > > |  * opkg_configure: ttf-liberation-mono.postinst returned 127.
> > > > > > |  * pkg_run_script: package "gtk-immodule-xim" postinst script
> > > > > > |  returned status 1. * opkg_configure: gtk-immodule-xim.postinst
> > > > > > |  returned 1. * pkg_run_script: package "ca-certificates"
> > > > > > |  postinst script returned status 1. * opkg_configure:
> > > > > > |  ca-certificates.postinst returned 1.
> > > > > > 
> > > > > > NOTE: package shr-lite-image-2.0-r20: task do_rootfs: Failed
> > > > > > ERROR: Task 9
> > > > > > (/OE/shr-core/meta-smartphone/meta-shr/recipes-shr/images/shr-lite
> > > > > > -image.bb, do_rootfs) failed with exit code ' 1'
> > > > > 
> > > > > This looks like you don't have the offline_postinstall patch applied?
> > > > 
> > > > I have
> > > 
> > > Please double check. That patch does things like:
> > > 
> > > Index: trunk/libopkg/pkg.c
> > > ===================================================================
> > > --- trunk.orig/libopkg/pkg.c	2011-12-15 15:58:39.000000000 +0000
> > > +++ trunk/libopkg/pkg.c	2011-12-15 20:04:50.109992736 +0000
> > > @@ -1297,8 +1297,9 @@
> > > 
> > >       free(cmd);
> > >       
> > >       if (err) {
> > > 
> > > -	  opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n",
> > > -               pkg->name, script, err);
> > > +          if (!conf->offline_root)
> > > +	       opkg_msg(ERROR, "package \"%s\" %s script returned status
> > > %d.\n", +                    pkg->name, script, err);
> > > 
> > >  	  return err;
> > >  	  
> > >       }
> > > 
> > > and these are clearly showing up as ERRORs above. This means that:
> > > 
> > > a) offline_root isn't set (extremely unlikely for do_rootfs to work)
> > > b) the patch isn't applied
> > > 
> > > > > opkg revision 633 will not build correct metadata without the patches
> > > > > included.
> > > > 
> > > > Only patch not included in my opkg build was the installorder one.
> > > 
> > > I have my doubts about this, sorry...
> > 
> > With runtime circular dependencies broken by RRECOMMENDS I managed to
> > build an image, but there is problem in target opkg
> > 
> > $D is not empty anymore (it's set to /), so all postinst scripts are
> > executing the variant for do_rootfs not for target, e.g.
> > 
> > Configuring opkg.
> > //var/lib/opkg/info/opkg.postinst: line 3: install: command not found
> > update-alternatives: Linking //usr/bin/opkg to /usr/bin/opkg-cl
> > Configuring kernel-module-fat.
> > //var/lib/opkg/info/kernel-module-fat.postinst: line 3:
> > arm-oe-linux-gnueabi-depmod: command not found
> > 
> Apart from circular dependencies my experiences with this patch is:
> 
> 1. dbus dir ownership: Most ownerships are correct now. Only /var/run/dbus is 
> still root:root ( at angstrom with custom fs-perms ).

I think the volatile handling is different in angstrom so I'm not sure
quite what is at fault here...

> 2. First boot is VERY fast now. Not that I have a problem with being fast - but 
> I see many lines like
> | S98configure[77]: * pkg_run_script: package "update-modules" postinst script 
> returned status 1.
> | S98configure[77]: * opkg_configure: update-modules.postinst returned 1.
> | S98configure[77]: * pkg_run_script: package "hicolor-icon-theme" postinst 
> script returned status 1.
> | S98configure[77]: * opkg_configure: hicolor-icon-theme.postinst returned 1.
> | S98configure[77]: * pkg_run_script: package "pango-module-basic-x" postinst 
> script returned status 1.
> | S98configure[77]: * opkg_configure: pango-module-basic-x.postinst returned 1.
> Many (all?) of these packages do not extend postinst.
> 
> 3. xfce gui I usually use is far from working (only mouse pointer that's it)

I'm pretty sure these last two are the on device postinstalls not
working as Martin mentions. We should just remove the
offlineroot_varname patch as the easiest fix. I did this in the hope we
could kill off some of the variables in the bbclass files but it doesn't
look like such a good idea now :/. I'll remove that patch is nobody
objects.

Cheers,

Richard
Martin Jansa - Dec. 19, 2011, 5:54 a.m.
On Sun, Dec 18, 2011 at 11:59:43PM +0000, Richard Purdie wrote:
> On Sun, 2011-12-18 at 12:44 +0100, Andreas Müller wrote:
> > On Sunday, December 18, 2011 12:00:42 PM Martin Jansa wrote:
> > > On Sat, Dec 17, 2011 at 11:52:25AM +0000, Richard Purdie wrote:
> > > > On Sat, 2011-12-17 at 11:34 +0100, Martin Jansa wrote:
> > > > > On Sat, Dec 17, 2011 at 10:22:01AM +0000, Richard Purdie wrote:
> > > > > > On Sat, 2011-12-17 at 10:20 +0100, Martin Jansa wrote:
> > > > > > > On Sat, Dec 17, 2011 at 01:32:28AM +0000, Richard Purdie wrote:
> > > > > > > I've tried to build image with SRCREV=633 and it built image fine
> > > > > > > then I tried to apply your patch but without installorder.patch to
> > > > > > > confirm that the issue with circular depending packages is really
> > > > > > > cause by that only and then try to fix installorder.patch to work
> > > > > > > even with such packages, but I got many postinst errors :(.
> > > > > > > 
> > > > > > > From your description I understood that postinst execution should
> > > > > > > be almost the same only more logic is moved from
> > > > > > > rootfs_ipk.bbclass to opkg itself.
> > > > > > > 
> > > > > > > | Collected errors:
> > > > > > > |  * pkg_run_script: package "pam-plugin-unix" postinst script
> > > > > > > |  returned status 1. * opkg_configure: pam-plugin-unix.postinst
> > > > > > > |  returned 1.
> > > > > > > |  * pkg_run_script: package "pango-module-basic-x" postinst script
> > > > > > > |  returned status 1. * opkg_configure:
> > > > > > > |  pango-module-basic-x.postinst returned 1. * pkg_run_script:
> > > > > > > |  package "pango-module-basic-fc" postinst script returned status
> > > > > > > |  1. * opkg_configure: pango-module-basic-fc.postinst returned 1.
> > > > > > > |  * pkg_run_script: package "update-modules" postinst script
> > > > > > > |  returned status 1. * opkg_configure: update-modules.postinst
> > > > > > > |  returned 1.
> > > > > > > |  * pkg_run_script: package "gdk-pixbuf-loader-png" postinst
> > > > > > > |  script returned status 1. * opkg_configure:
> > > > > > > |  gdk-pixbuf-loader-png.postinst returned 1. * pkg_run_script:
> > > > > > > |  package "gdk-pixbuf-loader-jpeg" postinst script returned
> > > > > > > |  status 1. * opkg_configure: gdk-pixbuf-loader-jpeg.postinst
> > > > > > > |  returned 1. * pkg_run_script: package "liberation-fonts"
> > > > > > > |  postinst script returned status 1. * opkg_configure:
> > > > > > > |  liberation-fonts.postinst returned 1. * pkg_run_script: package
> > > > > > > |  "gdk-pixbuf-loader-xpm" postinst script returned status 1. *
> > > > > > > |  opkg_configure: gdk-pixbuf-loader-xpm.postinst returned 1. *
> > > > > > > |  pkg_run_script: package "gdk-pixbuf-loader-gif" postinst script
> > > > > > > |  returned status 1. * opkg_configure:
> > > > > > > |  gdk-pixbuf-loader-gif.postinst returned 1. * pkg_run_script:
> > > > > > > |  package "ppp" postinst script returned status 1. *
> > > > > > > |  opkg_configure: ppp.postinst returned 1.
> > > > > > > |  * pkg_run_script: package "ttf-dejavu-common" postinst script
> > > > > > > |  returned status 127. * opkg_configure:
> > > > > > > |  ttf-dejavu-common.postinst returned 127. * pkg_run_script:
> > > > > > > |  package "ttf-dejavu-sans" postinst script returned status 127.
> > > > > > > |  * opkg_configure: ttf-dejavu-sans.postinst returned 127. *
> > > > > > > |  pkg_run_script: package "ffalarms" postinst script returned
> > > > > > > |  status 127. * opkg_configure: ffalarms.postinst returned 127.
> > > > > > > |  * pkg_run_script: package "rsyslog" postinst script returned
> > > > > > > |  status 1. * opkg_configure: rsyslog.postinst returned 1.
> > > > > > > |  * pkg_run_script: package "ttf-dejavu-sans-mono" postinst script
> > > > > > > |  returned status 127. * opkg_configure:
> > > > > > > |  ttf-dejavu-sans-mono.postinst returned 127. * pkg_run_script:
> > > > > > > |  package "matchbox-keyboard-im" postinst script returned status
> > > > > > > |  1. * opkg_configure: matchbox-keyboard-im.postinst returned 1.
> > > > > > > |  * pkg_run_script: package "hicolor-icon-theme" postinst script
> > > > > > > |  returned status 1. * opkg_configure:
> > > > > > > |  hicolor-icon-theme.postinst returned 1. * pkg_run_script:
> > > > > > > |  packaERROR: Function 'do_rootfs' failed (see
> > > > > > > |  /OE/shr-core/tmp-eglibc/work/qemuarm-oe-linux-gnueabi/shr-l
> > > > > > > 
> > > > > > > ite-image/2.0-r20/temp/log.do_rootfs.10063 for further information)
> > > > > > > 
> > > > > > > | ge "ttf-liberation-mono" postinst script returned status 127.
> > > > > > > | 
> > > > > > > |  * opkg_configure: ttf-liberation-mono.postinst returned 127.
> > > > > > > |  * pkg_run_script: package "gtk-immodule-xim" postinst script
> > > > > > > |  returned status 1. * opkg_configure: gtk-immodule-xim.postinst
> > > > > > > |  returned 1. * pkg_run_script: package "ca-certificates"
> > > > > > > |  postinst script returned status 1. * opkg_configure:
> > > > > > > |  ca-certificates.postinst returned 1.
> > > > > > > 
> > > > > > > NOTE: package shr-lite-image-2.0-r20: task do_rootfs: Failed
> > > > > > > ERROR: Task 9
> > > > > > > (/OE/shr-core/meta-smartphone/meta-shr/recipes-shr/images/shr-lite
> > > > > > > -image.bb, do_rootfs) failed with exit code ' 1'
> > > > > > 
> > > > > > This looks like you don't have the offline_postinstall patch applied?
> > > > > 
> > > > > I have
> > > > 
> > > > Please double check. That patch does things like:
> > > > 
> > > > Index: trunk/libopkg/pkg.c
> > > > ===================================================================
> > > > --- trunk.orig/libopkg/pkg.c	2011-12-15 15:58:39.000000000 +0000
> > > > +++ trunk/libopkg/pkg.c	2011-12-15 20:04:50.109992736 +0000
> > > > @@ -1297,8 +1297,9 @@
> > > > 
> > > >       free(cmd);
> > > >       
> > > >       if (err) {
> > > > 
> > > > -	  opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n",
> > > > -               pkg->name, script, err);
> > > > +          if (!conf->offline_root)
> > > > +	       opkg_msg(ERROR, "package \"%s\" %s script returned status
> > > > %d.\n", +                    pkg->name, script, err);
> > > > 
> > > >  	  return err;
> > > >  	  
> > > >       }
> > > > 
> > > > and these are clearly showing up as ERRORs above. This means that:
> > > > 
> > > > a) offline_root isn't set (extremely unlikely for do_rootfs to work)
> > > > b) the patch isn't applied
> > > > 
> > > > > > opkg revision 633 will not build correct metadata without the patches
> > > > > > included.
> > > > > 
> > > > > Only patch not included in my opkg build was the installorder one.
> > > > 
> > > > I have my doubts about this, sorry...
> > > 
> > > With runtime circular dependencies broken by RRECOMMENDS I managed to
> > > build an image, but there is problem in target opkg
> > > 
> > > $D is not empty anymore (it's set to /), so all postinst scripts are
> > > executing the variant for do_rootfs not for target, e.g.
> > > 
> > > Configuring opkg.
> > > //var/lib/opkg/info/opkg.postinst: line 3: install: command not found
> > > update-alternatives: Linking //usr/bin/opkg to /usr/bin/opkg-cl
> > > Configuring kernel-module-fat.
> > > //var/lib/opkg/info/kernel-module-fat.postinst: line 3:
> > > arm-oe-linux-gnueabi-depmod: command not found
> > > 
> > Apart from circular dependencies my experiences with this patch is:
> > 
> > 1. dbus dir ownership: Most ownerships are correct now. Only /var/run/dbus is 
> > still root:root ( at angstrom with custom fs-perms ).
> 
> I think the volatile handling is different in angstrom so I'm not sure
> quite what is at fault here...
> 
> > 2. First boot is VERY fast now. Not that I have a problem with being fast - but 
> > I see many lines like
> > | S98configure[77]: * pkg_run_script: package "update-modules" postinst script 
> > returned status 1.
> > | S98configure[77]: * opkg_configure: update-modules.postinst returned 1.
> > | S98configure[77]: * pkg_run_script: package "hicolor-icon-theme" postinst 
> > script returned status 1.
> > | S98configure[77]: * opkg_configure: hicolor-icon-theme.postinst returned 1.
> > | S98configure[77]: * pkg_run_script: package "pango-module-basic-x" postinst 
> > script returned status 1.
> > | S98configure[77]: * opkg_configure: pango-module-basic-x.postinst returned 1.
> > Many (all?) of these packages do not extend postinst.
> > 
> > 3. xfce gui I usually use is far from working (only mouse pointer that's it)
> 
> I'm pretty sure these last two are the on device postinstalls not
> working as Martin mentions. We should just remove the
> offlineroot_varname patch as the easiest fix. I did this in the hope we
> could kill off some of the variables in the bbclass files but it doesn't
> look like such a good idea now :/. I'll remove that patch is nobody
> objects.

What about setting D only for offline-root case and keeping PKG_ROOT as it
was (I'll rebase my patch on top of the one fixing circular dependencies
and send it after another image test).

Regards,

Patch

Index: trunk/libopkg/pkg.c
===================================================================
--- trunk.orig/libopkg/pkg.c	2011-12-15 15:58:39.000000000 +0000
+++ trunk/libopkg/pkg.c	2011-12-15 20:04:50.109992736 +0000
@@ -1297,8 +1297,9 @@ 
      free(cmd);
 
      if (err) {
-	  opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n", 
-               pkg->name, script, err);
+          if (!conf->offline_root)
+	       opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n", 
+                    pkg->name, script, err);
 	  return err;
      }