From 8ea7fa6d4c7734da6034d44f8b6d78d2993f1949 Mon Sep 17 00:00:00 2001 From: Kevin Tian Date: Thu, 26 Aug 2010 12:39:07 +0800 Subject: opkg: finalize the change to var directory commit 1d0757f16beb31551733d9d755d72337ccda9642 changes opkg run state from /usr/lib/opkg to /var/lib/opkg, which however is incomplete and still many important information is kept under old directory including postinst methods. This makes latest boot into a mess. So finalize this movement to /var here. Fix [BUGID #229] Signed-off-by: Kevin Tian --- meta/classes/rootfs_deb.bbclass | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'meta/classes/rootfs_deb.bbclass') diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass index 16b8a86a58..b33d153dae 100644 --- a/meta/classes/rootfs_deb.bbclass +++ b/meta/classes/rootfs_deb.bbclass @@ -8,6 +8,8 @@ ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts" do_rootfs[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot" do_rootfs[recrdeptask] += "do_package_write_deb" +opkglibdir = "${localstatedir}/lib/opkg" + fakeroot rootfs_deb_do_rootfs () { set +e mkdir -p ${IMAGE_ROOTFS}/var/dpkg/info @@ -120,13 +122,13 @@ fakeroot rootfs_deb_do_rootfs () { set -e # Hacks to allow opkg's update-alternatives and opkg to coexist for now - mkdir -p ${IMAGE_ROOTFS}/usr/lib/opkg + mkdir -p ${IMAGE_ROOTFS}${opkglibdir} if [ -e ${IMAGE_ROOTFS}/var/dpkg/alternatives ]; then rmdir ${IMAGE_ROOTFS}/var/dpkg/alternatives fi - ln -s /usr/lib/opkg/alternatives ${IMAGE_ROOTFS}/var/dpkg/alternatives - ln -s /var/dpkg/info ${IMAGE_ROOTFS}/usr/lib/opkg/info - ln -s /var/dpkg/status ${IMAGE_ROOTFS}/usr/lib/opkg/status + ln -s ${opkglibdir}/alternatives ${IMAGE_ROOTFS}/var/dpkg/alternatives + ln -s /var/dpkg/info ${IMAGE_ROOTFS}${opkglibdir}/info + ln -s /var/dpkg/status ${IMAGE_ROOTFS}${opkglibdir}/status ${ROOTFS_POSTPROCESS_COMMAND} @@ -154,6 +156,6 @@ rootfs_deb_log_check() { } remove_packaging_data_files() { - rm -rf ${IMAGE_ROOTFS}/usr/lib/opkg/ + rm -rf ${IMAGE_ROOTFS}${opkglibdir} rm -rf ${IMAGE_ROOTFS}/usr/dpkg/ } -- cgit v1.2.3