Received: from mail-ee0-f47.google.com ([74.125.83.47]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1Rbri2-0008J2-Vj for openembedded-core@lists.openembedded.org; Sat, 17 Dec 2011 11:41:43 +0100 Received: by eeit10 with SMTP id t10so409152eei.6 for ; Sat, 17 Dec 2011 02:34:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=kh6ULGNYqo8S7tWIIpqDxpV0GOwGHQNXCvgF1z/9jiE=; b=D5PbrtG1iNRX6dUjIzxpePDvZXKMQX5mfoSBYZBnqaY9hQAclvaZRfqrPpah0L+HaZ KzxB2dAGM1wfXhQ0uWd/80gpSBSfeYRC3lnr/lYRGfziODIw9JOM4cEO9wisicBpkazO 9oLeJPMcpvGLXKAgOUz8FGtUinqIzI4ui/9Dk= Received: by 10.14.49.133 with SMTP id x5mr1053431eeb.35.1324118082198; Sat, 17 Dec 2011 02:34:42 -0800 (PST) Received: from localhost ([94.230.152.246]) by mx.google.com with ESMTPS id a60sm12151603eeb.4.2011.12.17.02.34.40 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 17 Dec 2011 02:34:41 -0800 (PST) Date: Sat, 17 Dec 2011 11:34:29 +0100 From: Martin Jansa To: Patches and discussions about the oe-core layer Message-ID: <20111217103429.GG3997@jama.jama.net> References: <1323983329.4568.63.camel@ted> <20111217011658.GE3997@jama.jama.net> <1324085548.4568.121.camel@ted> <20111217092041.GF3997@jama.jama.net> <1324117321.4568.128.camel@ted> MIME-Version: 1.0 In-Reply-To: <1324117321.4568.128.camel@ted> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Graham Gower Subject: Re: opkg: Update svn 625 -> 633 and fix preinst issues X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Patches and discussions about the oe-core layer List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Dec 2011 10:41:43 -0000 X-Groupsio-MsgNum: 14379 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4ndw/alBWmZEhfcZ" Content-Disposition: inline --4ndw/alBWmZEhfcZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: > > > On Sat, 2011-12-17 at 02:16 +0100, Martin Jansa wrote: > > > > On Thu, Dec 15, 2011 at 09:08:49PM +0000, Richard Purdie wrote: > > > > > There is a major issue with opkg images at the moment as preinst > > > > > functions are not being executed before their dependencies are in= stalled > > > > > and this is leading to corruption of images containing avahi/dbus= in > > > > > particular. > > > > >=20 > > > > > There are various changes in upstream opkg in the last 8 revision= s which > > > > > make changes in this area but sadly these aren't enough to get th= ings > > > > > working for us. I've updated to the latest svn revision with this= patch > > > > > since it makes sense to pull in those changes first and then supp= lement > > > > > them with the attached patches. > > > > >=20 > > > > > There is a full description of the patches in the patch headers b= ut in > > > > > summary they: > > > > >=20 > > > > > a) Ensure preinst functions execute with their dependencies insta= lled. > > > > > This is a pretty invasive change as it changes the package ins= tall > > > > > ordering in general. > > > > > b) Ensure opkg sets $D, not $PKG_ROOT which we don't use > > > > > c) Change opkg to allow execution of postinstall functions which = fail > > > > > resulting in execution on the target device as rootfs_ipk.bbcl= ass > > > > > currently does manually. > > > > >=20 > > > > > The remaining changes interface this with the rest of the OE build > > > > > infrastructure, adding in the option to tell opkg to run the prei= nst and > > > > > postinst functions, ensure the correct environment is present for= the > > > > > postinst scripts and removing the now unneeded rootfs_ipk class c= ode > > > > > which opkg now does itself. > > > > >=20 > > > > > [YOCTO #1711] > > > >=20 > > > > Hi, > > > >=20 > > > > today I got image build failing with this and it seems like some ki= nd of > > > > circular dependency or something. > > > >=20 > > > > In fsogsmd_git.bb we have: > > > > PACKAGES =3D+ "${PN}-connman ${PN}-connman-dev ${PN}-connman-dbg" > > > > RDEPENDS_${PN} +=3D "${PN}-connman" > > > >=20 > > > > and there is also fsogsmd-connman dependency on fsogsmd (because of= shlibs), > > > > so it's really circular dependency between runtime packages and new= opkg cannot > > > > deal with it. > > > >=20 > > > > Then in log.do_rootfs > > > > Installing fsogsmd (1:0.5.0+gitr20+96698077b6ccd5fc1222e0b2b9fc56d0= 87c6c528-r6.7) to root... > > > > Downloading file:/OE/shr-core/tmp-eglibc/deploy/ipk/qemuarm/fsogsmd= _0.5.0+gitr20+96698077b6ccd5fc1222e0b2b9fc56d087c6c528-r6.7_qemuarm.ipk. > > > > Installing fsogsmd-connman (1:0.5.0+gitr20+96698077b6ccd5fc1222e0b2= b9fc56d087c6c528-r6.7) to root... > > > > Downloading file:/OE/shr-core/tmp-eglibc/deploy/ipk/qemuarm/fsogsmd= -connman_0.5.0+gitr20+96698077b6ccd5fc1222e0b2b9fc56d087c6c528-r6.7_qemuarm= =2Eipk. > > > > Installing fsogsmd (1:0.5.0+gitr20+96698077b6ccd5fc1222e0b2b9fc56d0= 87c6c528-r6.7) to root... > > > > Installing fsogsmd-connman (1:0.5.0+gitr20+96698077b6ccd5fc1222e0b2= b9fc56d087c6c528-r6.7) to root... > > > > and then this last 2 lines 1794/2 times > > > > Installing fsogsmd (1:0.5.0+gitr20+96698077b6ccd5fc1222e0b2b9fc56d0= 87c6c528-r6.7) to root... > > > > Installing fsogsmd-connman (1:0.5.0+gitr20+96698077b6ccd5fc1222e0b2= b9fc56d087c6c528-r6.7) to root... > > > > Installing task-core-ssh-openssh (1.0-r0) to root... > > > > Downloading file:/OE/shr-core/tmp-eglibc/deploy/ipk/armv5te/task-co= re-ssh-openssh_1.0-r0_armv5te.ipk. > > > > ... > > > > and in the end: > > > > ERROR: Function 'do_rootfs' failed (see /OE/shr-core/tmp-eglibc/wor= k/qemuarm-oe-linux-gnueabi/shr-lite-image/2.0-r20/temp/log.do_rootfs.20387 = for further information) > > > > Collected errors: > > > > * gz_close: Unzip process killed by signal 11. > > > >=20 > > > > * pkg_get_installed_files: Error extracting file list from /tmp/op= kg-T7G08e/fsogsmd-connman_0.5.0+gitr20+96698077b6ccd5fc1222e0b2b9fc56d087c6= c528-r6.7_qemuarm.ipk. > > > > * opkg_install_cmd: Cannot install package task-shr-minimal-apps. > > > >=20 > > > > Reverting this patch and rebuilding opkg before running image build= helps. > > > >=20 > > > > I'll try to upgrade only opkg without your patches first, but I gue= ss it's > > > > because of fix_installorder.patch, can we teach it to break circula= r dependencies > > > > or should I fix it in metadata? It seem that longer cycles like > > > >=20 > > > > fsogsmd-config -> fsogsmd-module-modem-ti-calypso -> fsogsmd -> fso= gsmd-config > > > >=20 > > > > does work. > > >=20 > > > This is likely as a result of the installorder patch :/. Sadly if we > > > want the postinstalls to be installed in order we do need that patch. > >=20 > > I've tried to build image with SRCREV=3D633 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 :(.=20 > >=20 > > 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. > >=20 > > | 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 ret= urned status 1. > > | * opkg_configure: pango-module-basic-x.postinst returned 1. > > | * pkg_run_script: package "pango-module-basic-fc" postinst script re= turned 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 re= turned status 1. > > | * opkg_configure: gdk-pixbuf-loader-png.postinst returned 1. > > | * pkg_run_script: package "gdk-pixbuf-loader-jpeg" postinst script r= eturned status 1. > > | * opkg_configure: gdk-pixbuf-loader-jpeg.postinst returned 1. > > | * pkg_run_script: package "liberation-fonts" postinst script returne= d status 1. > > | * opkg_configure: liberation-fonts.postinst returned 1. > > | * pkg_run_script: package "gdk-pixbuf-loader-xpm" postinst script re= turned status 1. > > | * opkg_configure: gdk-pixbuf-loader-xpm.postinst returned 1. > > | * pkg_run_script: package "gdk-pixbuf-loader-gif" postinst script re= turned 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 return= ed 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 ret= urned status 127. > > | * opkg_configure: ttf-dejavu-sans-mono.postinst returned 127. > > | * pkg_run_script: package "matchbox-keyboard-im" postinst script ret= urned status 1. > > | * opkg_configure: matchbox-keyboard-im.postinst returned 1. > > | * pkg_run_script: package "hicolor-icon-theme" postinst script retur= ned status 1. > > | * opkg_configure: hicolor-icon-theme.postinst returned 1. > > | * pkg_run_script: packaERROR: Function 'do_rootfs' failed (see /OE/s= hr-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 returne= d 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' >=20 > This looks like you don't have the offline_postinstall patch applied? I have >=20 > opkg revision 633 will not build correct metadata without the patches > included. Only patch not included in my opkg build was the installorder one. =20 > > > The question is whether circular depends are something opkg should > > > support or not? What's debian's behaviour in that regard? > >=20 > > Well, it did work before and from quick search it looks that such circu= lar dependencies are=20 > > quite common in our metadata. >=20 > 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 abou= t order of installs. >=20 > 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. > Cheers, >=20 > Richard >=20 >=20 > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core --=20 Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com --4ndw/alBWmZEhfcZ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk7scDUACgkQN1Ujt2V2gBxcDACgkru2kcBY+2KbeZ+N03SWEWt+ JngAoKFLWmARCGZbGsrZVYLy34UF9yZ/ =Hqc8 -----END PGP SIGNATURE----- --4ndw/alBWmZEhfcZ--