rootfs_deb.bbclass: fix alternatives handling
authorFilip Zyzniewski <filip.zyzniewski@gmail.com>
Mon, 7 Feb 2011 04:12:05 +0000 (04:12 +0000)
committerTom Rini <tom_rini@mentor.com>
Tue, 8 Feb 2011 14:20:17 +0000 (07:20 -0700)
commit0bf03ff7ee9bb145c3eb5c2602dc7acd6fe2880c
treed8acaacd8c20e163aadad3f398463539dfa2fc10
parent980b11d6703e70725e88b1292a30b1eeeec8449f
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 <filip.zyzniewski@gmail.com>
Signed-off-by: Tom Rini <tom_rini@mentor.com>
classes/rootfs_deb.bbclass