aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2014-08-28 05:36:18 +0200
committerAndreas Oberritter <obi@opendreambox.org>2015-02-23 17:15:50 +0100
commitb6325dd2ce1433b4564fef5b063232969925b79a (patch)
treed05664a525b87b0a67dd012a9459dd9dec0fdf13
parent39973d0ef8205c4d4bf02c63d518712d7a323e5e (diff)
downloadopenembedded-core-contrib-b6325dd2ce1433b4564fef5b063232969925b79a.tar.gz
openembedded-core-contrib-b6325dd2ce1433b4564fef5b063232969925b79a.tar.bz2
openembedded-core-contrib-b6325dd2ce1433b4564fef5b063232969925b79a.zip
rootfs_deb_do_rootfs: Only install opkg hack if needed
If update-alternatives-opkg was used, then .../opkg/alternatives already exists at this point. If not, then there's no need for a symlink. Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
-rw-r--r--meta/classes/rootfs_deb.bbclass15
1 files changed, 8 insertions, 7 deletions
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index 14c83f05f3a..60f068956a3 100644
--- a/meta/classes/rootfs_deb.bbclass
+++ b/meta/classes/rootfs_deb.bbclass
@@ -73,14 +73,15 @@ fakeroot rootfs_deb_do_rootfs () {
install -d ${IMAGE_ROOTFS}/${sysconfdir}
echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version
- # Hacks to allow opkg's update-alternatives and opkg to coexist for now
- mkdir -p ${IMAGE_ROOTFS}${opkglibdir}
- if [ -e ${IMAGE_ROOTFS}/var/lib/dpkg/alternatives ]; then
- rmdir ${IMAGE_ROOTFS}/var/lib/dpkg/alternatives
+ # Hacks to allow opkg's update-alternatives and dpkg to coexist for now
+ if [ -d "${IMAGE_ROOTFS}${opkglibdir}/alternatives" ]; then
+ if [ -e ${IMAGE_ROOTFS}/var/lib/dpkg/alternatives ]; then
+ rmdir ${IMAGE_ROOTFS}/var/lib/dpkg/alternatives
+ fi
+ ln -s ${opkglibdir}/alternatives ${IMAGE_ROOTFS}/var/lib/dpkg/alternatives
+ ln -s /var/lib/dpkg/info ${IMAGE_ROOTFS}${opkglibdir}/info
+ ln -s /var/lib/dpkg/status ${IMAGE_ROOTFS}${opkglibdir}/status
fi
- ln -s ${opkglibdir}/alternatives ${IMAGE_ROOTFS}/var/lib/dpkg/alternatives
- ln -s /var/lib/dpkg/info ${IMAGE_ROOTFS}${opkglibdir}/info
- ln -s /var/lib/dpkg/status ${IMAGE_ROOTFS}${opkglibdir}/status
${ROOTFS_POSTPROCESS_COMMAND}