summaryrefslogtreecommitdiffstats
path: root/meta/classes/rootfs_ipk.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-15 21:08:49 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-16 15:59:07 +0000
commit2feba313c991170747381c7cf821a45c2cd04632 (patch)
treef53222069b8660a3d2997dc2b5030fb2f33c5510 /meta/classes/rootfs_ipk.bbclass
parent9f1d23a5dd6c60ffe360d8b339768c7e4fb98323 (diff)
downloadopenembedded-core-2feba313c991170747381c7cf821a45c2cd04632.tar.gz
opkg: Update svn 625 -> 633 and fix preinst issues
There is a major issue with opkg images at the moment as preinst functions are not being executed before their dependencies are installed and this is leading to corruption of images containing avahi/dbus in particular. There are various changes in upstream opkg in the last 8 revisions which make changes in this area but sadly these aren't enough to get things 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 supplement them with the attached patches. There is a full description of the patches in the patch headers but in summary they: a) Ensure preinst functions execute with their dependencies installed. This is a pretty invasive change as it changes the package install 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.bbclass currently does manually. The remaining changes interface this with the rest of the OE build infrastructure, adding in the option to tell opkg to run the preinst and postinst functions, ensure the correct environment is present for the postinst scripts and removing the now unneeded rootfs_ipk class code which opkg now does itself. [YOCTO #1711] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs_ipk.bbclass')
-rw-r--r--meta/classes/rootfs_ipk.bbclass26
1 files changed, 3 insertions, 23 deletions
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index ec0195159e..b5556fa254 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -60,14 +60,14 @@ fakeroot rootfs_ipk_do_rootfs () {
export INSTALL_CONF_IPK="${IPKGCONF_TARGET}"
export INSTALL_PACKAGES_IPK="${PACKAGE_INSTALL}"
- package_install_internal_ipk
-
#post install
export D=${IMAGE_ROOTFS}
export OFFLINE_ROOT=${IMAGE_ROOTFS}
export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
export OPKG_OFFLINE_ROOT=${IPKG_OFFLINE_ROOT}
+ package_install_internal_ipk
+
# Distro specific packages should create this
#mkdir -p ${IMAGE_ROOTFS}/etc/opkg/
#grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}/etc/opkg/arch.conf
@@ -75,28 +75,8 @@ fakeroot rootfs_ipk_do_rootfs () {
${OPKG_POSTPROCESS_COMMANDS}
${ROOTFS_POSTINSTALL_COMMAND}
- runtime_script_required=0
-
- # Base-passwd needs to run first to install /etc/passwd and friends
- if [ -e ${IMAGE_ROOTFS}${opkglibdir}/info/base-passwd.preinst ] ; then
- sh ${IMAGE_ROOTFS}${opkglibdir}/info/base-passwd.preinst
- fi
-
- for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.preinst; do
- if [ -f $i ] && ! sh $i; then
- runtime_script_required=1
- opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst`
- fi
- done
- for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.postinst; do
- if [ -f $i ] && ! sh $i configure; then
- runtime_script_required=1
- opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst`
- fi
- done
-
if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then
- if [ $runtime_script_required -eq 1 ]; then
+ if grep Status:.install.ok.unpacked ${IMAGE_ROOTFS}${opkglibdir}status; then
echo "Some packages could not be configured offline and rootfs is read-only."
exit 1
fi