summaryrefslogtreecommitdiff
path: root/classes/rootfs_deb.bbclass
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2007-09-01 20:11:50 +0000
committerKoen Kooi <koen@openembedded.org>2007-09-01 20:11:50 +0000
commite4d7738fbc91777724b46be25d401c08ad31d9c1 (patch)
tree7016e1a8b79bf736c350ed28c13425aab7862fd0 /classes/rootfs_deb.bbclass
parent5ce0154bcbbb6ed2bd30d2ee204630ea98dd9b69 (diff)
rootfs_deb: make sure directories exist before trying to symlink them
Diffstat (limited to 'classes/rootfs_deb.bbclass')
-rw-r--r--classes/rootfs_deb.bbclass14
1 files changed, 11 insertions, 3 deletions
diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass
index 35e29b3e45..6db02fa150 100644
--- a/classes/rootfs_deb.bbclass
+++ b/classes/rootfs_deb.bbclass
@@ -112,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}