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 16:05:37 +0000
commit1855e94280bdbce2de84cb81cdd61f01950d05d9 (patch)
tree7e7eb13a71ced54a5a7ad36f66c1d4547f4d5a41 /meta/classes/rootfs_ipk.bbclass
parentc7335bd21b2413582cee1dec79700c3ac70a65e5 (diff)
downloadpoky-1855e94280bdbce2de84cb81cdd61f01950d05d9.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] (From OE-Core rev: 2feba313c991170747381c7cf821a45c2cd04632) 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 () {
60 export INSTALL_CONF_IPK="${IPKGCONF_TARGET}" 60 export INSTALL_CONF_IPK="${IPKGCONF_TARGET}"
61 export INSTALL_PACKAGES_IPK="${PACKAGE_INSTALL}" 61 export INSTALL_PACKAGES_IPK="${PACKAGE_INSTALL}"
62 62
63 package_install_internal_ipk
64
65 #post install 63 #post install
66 export D=${IMAGE_ROOTFS} 64 export D=${IMAGE_ROOTFS}
67 export OFFLINE_ROOT=${IMAGE_ROOTFS} 65 export OFFLINE_ROOT=${IMAGE_ROOTFS}
68 export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS} 66 export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
69 export OPKG_OFFLINE_ROOT=${IPKG_OFFLINE_ROOT} 67 export OPKG_OFFLINE_ROOT=${IPKG_OFFLINE_ROOT}
70 68
69 package_install_internal_ipk
70
71 # Distro specific packages should create this 71 # Distro specific packages should create this
72 #mkdir -p ${IMAGE_ROOTFS}/etc/opkg/ 72 #mkdir -p ${IMAGE_ROOTFS}/etc/opkg/
73 #grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}/etc/opkg/arch.conf 73 #grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}/etc/opkg/arch.conf
@@ -75,28 +75,8 @@ fakeroot rootfs_ipk_do_rootfs () {
75 ${OPKG_POSTPROCESS_COMMANDS} 75 ${OPKG_POSTPROCESS_COMMANDS}
76 ${ROOTFS_POSTINSTALL_COMMAND} 76 ${ROOTFS_POSTINSTALL_COMMAND}
77 77
78 runtime_script_required=0
79
80 # Base-passwd needs to run first to install /etc/passwd and friends
81 if [ -e ${IMAGE_ROOTFS}${opkglibdir}/info/base-passwd.preinst ] ; then
82 sh ${IMAGE_ROOTFS}${opkglibdir}/info/base-passwd.preinst
83 fi
84
85 for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.preinst; do
86 if [ -f $i ] && ! sh $i; then
87 runtime_script_required=1
88 opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst`
89 fi
90 done
91 for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.postinst; do
92 if [ -f $i ] && ! sh $i configure; then
93 runtime_script_required=1
94 opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst`
95 fi
96 done
97
98 if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then 78 if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then
99 if [ $runtime_script_required -eq 1 ]; then 79 if grep Status:.install.ok.unpacked ${IMAGE_ROOTFS}${opkglibdir}status; then
100 echo "Some packages could not be configured offline and rootfs is read-only." 80 echo "Some packages could not be configured offline and rootfs is read-only."
101 exit 1 81 exit 1
102 fi 82 fi