rootfs_deb.bbclass: fix alternatives handling
PATCH 1/1 rootfs_deb.bbclass: fix alternatives handling
After fixing update-alternatives-native the command:
rmdir ${IMAGE_ROOTFS}/var/dpkg/alternatives
fails, because the directory is not empty, and the command:
ln -s ${libdir}/opkg/alternatives ${IMAGE_ROOTFS}/var/dpkg/alternatives
creates a dangling symlink, because we mkdir only the parent directory of the target.
Fixes: mkdir -p the alternatives directory itself and move alternatives definitions into it before rmdiring the original alternatives directory
Signed-off-by Filip Zyzniewski <[email protected]>
--- classes/rootfs_deb.bbclass | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
classes/rootfs_deb.bbclass +2 -1
@@ -123,8 +123,9 @@ fakeroot rootfs_deb_do_rootfs () { set -e # Hacks to allow opkg's update-alternatives and opkg to coexist for now - mkdir -p ${IMAGE_ROOTFS}${libdir}/opkg + mkdir -p ${IMAGE_ROOTFS}${libdir}/opkg/alternatives if [ -e ${IMAGE_ROOTFS}/var/dpkg/alternatives ]; then + mv ${IMAGE_ROOTFS}/var/dpkg/alternatives/* ${IMAGE_ROOTFS}${libdir}/opkg/alternatives/ rmdir ${IMAGE_ROOTFS}/var/dpkg/alternatives fi ln -s ${libdir}/opkg/alternatives ${IMAGE_ROOTFS}/var/dpkg/alternatives
Signature · 1 line
1.7.1