diff options
author | Richard Purdie <richard@openedhand.com> | 2006-11-27 22:57:27 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-11-27 22:57:27 +0000 |
commit | e65d97d62fc5f42f4dccc7aa2e3900a70a4a599e (patch) | |
tree | f1b0460e3b36f97579c828f9b3a29797ddffd47c | |
parent | 207db00743b82b4f6ad7c9db974129a8a5ef1daa (diff) | |
download | openembedded-core-e65d97d62fc5f42f4dccc7aa2e3900a70a4a599e.tar.gz openembedded-core-e65d97d62fc5f42f4dccc7aa2e3900a70a4a599e.tar.bz2 openembedded-core-e65d97d62fc5f42f4dccc7aa2e3900a70a4a599e.tar.xz openembedded-core-e65d97d62fc5f42f4dccc7aa2e3900a70a4a599e.zip |
rootfs_deb.bbclass: Mark packages as installed/unpacked correctly. Add in hacks to work around /var being tmpfs and to enable ipkg to handle the postinsts on device (for now)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@966 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r-- | meta/classes/rootfs_deb.bbclass | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass index 19e8b4420..87a2bd642 100644 --- a/meta/classes/rootfs_deb.bbclass +++ b/meta/classes/rootfs_deb.bbclass @@ -29,7 +29,9 @@ fakeroot rootfs_deb_do_rootfs () { priority=$(expr $priority + 5) done - cat "${STAGING_DIR}/etc/apt/apt.conf.sample" | sed -e 's#Architecture ".*";#Architecture "${TARGET_ARCH}";#' > "${STAGING_DIR}/etc/apt/apt-rootfs.conf" + cat "${STAGING_DIR}/etc/apt/apt.conf.sample" \ + | sed -e 's#Architecture ".*";#Architecture "${TARGET_ARCH}";#' \ + > "${STAGING_DIR}/etc/apt/apt-rootfs.conf" export APT_CONFIG="${STAGING_DIR}/etc/apt/apt-rootfs.conf" export D=${IMAGE_ROOTFS} @@ -73,12 +75,19 @@ fakeroot rootfs_deb_do_rootfs () { install -d ${IMAGE_ROOTFS}/${sysconfdir} echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version + # Mark all packages installed + sed -i -e "s/Status: install ok unpacked/Status: install ok installed/;" ${IMAGE_ROOTFS}/var/dpkg/status + + # Attempt to run preinsts + # Mark packages with preinst failures as unpacked for i in ${IMAGE_ROOTFS}/var/dpkg/info/*.preinst; do if [ -f $i ] && ! sh $i; then _flag unpacked `basename $i .preinst` fi done + # Attempt to run postinsts + # Mark packages with postinst failures as unpacked for i in ${IMAGE_ROOTFS}/var/dpkg/info/*.postinst; do if [ -f $i ] && ! sh $i configure; then _flag unpacked `basename $i .postinst` @@ -87,6 +96,13 @@ fakeroot rootfs_deb_do_rootfs () { set -e + # Hacks to make dpkg/ipkg coexist for now + mv ${IMAGE_ROOTFS}/var/dpkg ${IMAGE_ROOTFS}/usr/ + rmdir ${IMAGE_ROOTFS}/usr/dpkg/alternatives + ln -s /usr/lib/ipkg/alternatives ${IMAGE_ROOTFS}/usr/dpkg/alternatives + ln -s /usr/dpkg/info ${IMAGE_ROOTFS}/usr/lib/ipkg/info + ln -s /usr/dpkg/status ${IMAGE_ROOTFS}/usr/lib/ipkg/status + ${ROOTFS_POSTPROCESS_COMMAND} log_check rootfs |