summaryrefslogtreecommitdiffstats
path: root/meta/classes/rootfs_deb.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/rootfs_deb.bbclass')
-rw-r--r--meta/classes/rootfs_deb.bbclass18
1 files changed, 17 insertions, 1 deletions
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index 19e8b44207..87a2bd6424 100644
--- a/meta/classes/rootfs_deb.bbclass
+++ b/meta/classes/rootfs_deb.bbclass
@@ -29,7 +29,9 @@ fakeroot rootfs_deb_do_rootfs () {
29 priority=$(expr $priority + 5) 29 priority=$(expr $priority + 5)
30 done 30 done
31 31
32 cat "${STAGING_DIR}/etc/apt/apt.conf.sample" | sed -e 's#Architecture ".*";#Architecture "${TARGET_ARCH}";#' > "${STAGING_DIR}/etc/apt/apt-rootfs.conf" 32 cat "${STAGING_DIR}/etc/apt/apt.conf.sample" \
33 | sed -e 's#Architecture ".*";#Architecture "${TARGET_ARCH}";#' \
34 > "${STAGING_DIR}/etc/apt/apt-rootfs.conf"
33 35
34 export APT_CONFIG="${STAGING_DIR}/etc/apt/apt-rootfs.conf" 36 export APT_CONFIG="${STAGING_DIR}/etc/apt/apt-rootfs.conf"
35 export D=${IMAGE_ROOTFS} 37 export D=${IMAGE_ROOTFS}
@@ -73,12 +75,19 @@ fakeroot rootfs_deb_do_rootfs () {
73 install -d ${IMAGE_ROOTFS}/${sysconfdir} 75 install -d ${IMAGE_ROOTFS}/${sysconfdir}
74 echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version 76 echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version
75 77
78 # Mark all packages installed
79 sed -i -e "s/Status: install ok unpacked/Status: install ok installed/;" ${IMAGE_ROOTFS}/var/dpkg/status
80
81 # Attempt to run preinsts
82 # Mark packages with preinst failures as unpacked
76 for i in ${IMAGE_ROOTFS}/var/dpkg/info/*.preinst; do 83 for i in ${IMAGE_ROOTFS}/var/dpkg/info/*.preinst; do
77 if [ -f $i ] && ! sh $i; then 84 if [ -f $i ] && ! sh $i; then
78 _flag unpacked `basename $i .preinst` 85 _flag unpacked `basename $i .preinst`
79 fi 86 fi
80 done 87 done
81 88
89 # Attempt to run postinsts
90 # Mark packages with postinst failures as unpacked
82 for i in ${IMAGE_ROOTFS}/var/dpkg/info/*.postinst; do 91 for i in ${IMAGE_ROOTFS}/var/dpkg/info/*.postinst; do
83 if [ -f $i ] && ! sh $i configure; then 92 if [ -f $i ] && ! sh $i configure; then
84 _flag unpacked `basename $i .postinst` 93 _flag unpacked `basename $i .postinst`
@@ -87,6 +96,13 @@ fakeroot rootfs_deb_do_rootfs () {
87 96
88 set -e 97 set -e
89 98
99 # Hacks to make dpkg/ipkg coexist for now
100 mv ${IMAGE_ROOTFS}/var/dpkg ${IMAGE_ROOTFS}/usr/
101 rmdir ${IMAGE_ROOTFS}/usr/dpkg/alternatives
102 ln -s /usr/lib/ipkg/alternatives ${IMAGE_ROOTFS}/usr/dpkg/alternatives
103 ln -s /usr/dpkg/info ${IMAGE_ROOTFS}/usr/lib/ipkg/info
104 ln -s /usr/dpkg/status ${IMAGE_ROOTFS}/usr/lib/ipkg/status
105
90 ${ROOTFS_POSTPROCESS_COMMAND} 106 ${ROOTFS_POSTPROCESS_COMMAND}
91 107
92 log_check rootfs 108 log_check rootfs