summaryrefslogtreecommitdiff
path: root/meta/classes/rootfs_deb.bbclass
diff options
context:
space:
mode:
authorKevin Tian <kevin.tian@intel.com>2010-08-26 12:39:07 +0800
committerJoshua Lock <josh@linux.intel.com>2010-08-26 08:54:55 +0100
commit8ea7fa6d4c7734da6034d44f8b6d78d2993f1949 (patch)
treed0be459748627b653337548837be820c529a8117 /meta/classes/rootfs_deb.bbclass
parentd46c362a46f26b38d8da30f6a83e7c0fdadda348 (diff)
downloadopenembedded-core-8ea7fa6d4c7734da6034d44f8b6d78d2993f1949.tar.gz
openembedded-core-8ea7fa6d4c7734da6034d44f8b6d78d2993f1949.tar.bz2
openembedded-core-8ea7fa6d4c7734da6034d44f8b6d78d2993f1949.zip
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 <kevin.tian@intel.com>
Diffstat (limited to 'meta/classes/rootfs_deb.bbclass')
-rw-r--r--meta/classes/rootfs_deb.bbclass12
1 files changed, 7 insertions, 5 deletions
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/
}