summaryrefslogtreecommitdiff
path: root/classes/rootfs_deb.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/rootfs_deb.bbclass')
-rw-r--r--classes/rootfs_deb.bbclass52
1 files changed, 31 insertions, 21 deletions
diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass
index 32b1c57f1a..d3e5832251 100644
--- a/classes/rootfs_deb.bbclass
+++ b/classes/rootfs_deb.bbclass
@@ -3,10 +3,12 @@
#
do_rootfs[depends] += "dpkg-native:do_populate_staging apt-native:do_populate_staging"
+do_rootfs[recrdeptask] += "do_package_write_deb"
fakeroot rootfs_deb_do_rootfs () {
set +e
- mkdir -p ${IMAGE_ROOTFS}/var/dpkg/{info,updates}
+ mkdir -p ${IMAGE_ROOTFS}/var/dpkg/info
+ mkdir -p ${IMAGE_ROOTFS}/var/dpkg/updates
rm -f ${STAGING_DIR}/etc/apt/sources.list.rev
rm -f ${STAGING_DIR}/etc/apt/preferences
@@ -53,26 +55,26 @@ fakeroot rootfs_deb_do_rootfs () {
_getflag () {
cat ${IMAGE_ROOTFS}/var/dpkg/status | sed -n -e "/^Package: $2\$/{n; s/Status: install ok .*/$1/; p}"
}
-
- if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then
- if [ ! -z "${LINGUAS_INSTALL}" ]; then
- apt-get install glibc-localedata-i18n --force-yes --allow-unauthenticated
- if [ $? -ne 0 ]; then
- exit $?
- fi
- for i in ${LINGUAS_INSTALL}; do
- apt-get install $i --force-yes --allow-unauthenticated
- if [ $? -ne 0 ]; then
- exit $?
- fi
- done
- fi
- fi
+
+ if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then
+ if [ ! -z "${LINGUAS_INSTALL}" ]; then
+ apt-get install glibc-localedata-i18n --force-yes --allow-unauthenticated
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+ for i in ${LINGUAS_INSTALL}; do
+ apt-get install $i --force-yes --allow-unauthenticated
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+ done
+ fi
+ fi
if [ ! -z "${PACKAGE_INSTALL}" ]; then
for i in ${PACKAGE_INSTALL}; do
apt-get install $i --force-yes --allow-unauthenticated
- if [ $? -eq 1 ]; then
+ if [ $? -ne 0 ]; then
exit 1
fi
find ${IMAGE_ROOTFS} -name \*.dpkg-new | for i in `cat`; do
@@ -110,9 +112,17 @@ fakeroot rootfs_deb_do_rootfs () {
if [ -e ${IMAGE_ROOTFS}/usr/dpkg/alternatives ]; then
rmdir ${IMAGE_ROOTFS}/usr/dpkg/alternatives
fi
- 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
+ if [ ! -e ${IMAGE_ROOTFS}/usr/lib/ipkg ] ; then
+ mkdir -p ${IMAGE_ROOTFS}/usr/lib/ipkg
+ fi
+
+ if [ ! -e ${IMAGE_ROOTFS}/etc/ipkg ] ; then
+ mkdir -p ${IMAGE_ROOTFS}/etc/ipkg
+ fi
+
+ ln -sf /usr/lib/ipkg/alternatives ${IMAGE_ROOTFS}/usr/dpkg/alternatives
+ ln -sf /usr/dpkg/info ${IMAGE_ROOTFS}/usr/lib/ipkg/info
+ ln -sf /usr/dpkg/status ${IMAGE_ROOTFS}/usr/lib/ipkg/status
${ROOTFS_POSTPROCESS_COMMAND}
@@ -132,7 +142,7 @@ rootfs_deb_log_check() {
echo -e "log_check: Matched keyword: [$keyword_die]\n"
echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die"
echo ""
- do_exit=1
+ do_exit=1
fi
done
test "$do_exit" = 1 && exit 1