summaryrefslogtreecommitdiff
path: root/meta/classes/rootfs_ipk.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_ipk.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_ipk.bbclass')
-rw-r--r--meta/classes/rootfs_ipk.bbclass18
1 files changed, 10 insertions, 8 deletions
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 0bfa49194d..c9edec2b52 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -18,6 +18,8 @@ OPKG_PREPROCESS_COMMANDS = "package_update_index_ipk; package_generate_ipkg_conf
OPKG_POSTPROCESS_COMMANDS = "ipk_insert_feed_uris"
+opkglibdir = "${localstatedir}/lib/opkg"
+
fakeroot rootfs_ipk_do_rootfs () {
set -x
@@ -27,7 +29,7 @@ fakeroot rootfs_ipk_do_rootfs () {
${OPKG_PREPROCESS_COMMANDS}
mkdir -p ${T}/
- mkdir -p ${IMAGE_ROOTFS}/usr/lib/opkg/
+ mkdir -p ${IMAGE_ROOTFS}${opkglibdir}
opkg-cl ${IPKG_ARGS} update
@@ -59,12 +61,12 @@ fakeroot rootfs_ipk_do_rootfs () {
${OPKG_POSTPROCESS_COMMANDS}
${ROOTFS_POSTINSTALL_COMMAND}
- for i in ${IMAGE_ROOTFS}${libdir}/opkg/info/*.preinst; do
+ for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.preinst; do
if [ -f $i ] && ! sh $i; then
opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst`
fi
done
- for i in ${IMAGE_ROOTFS}${libdir}/opkg/info/*.postinst; do
+ for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.postinst; do
if [ -f $i ] && ! sh $i configure; then
opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst`
fi
@@ -75,7 +77,7 @@ fakeroot rootfs_ipk_do_rootfs () {
${ROOTFS_POSTPROCESS_COMMAND}
- rm -f ${IMAGE_ROOTFS}${libdir}/opkg/lists/*
+ rm -f ${IMAGE_ROOTFS}${opkglibdir}/lists/*
log_check rootfs
}
@@ -102,7 +104,7 @@ rootfs_ipk_log_check() {
rootfs_ipk_write_manifest() {
manifest=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest
- cp ${IMAGE_ROOTFS}/usr/lib/opkg/status $manifest
+ cp ${IMAGE_ROOTFS}${opkglibdir}/status $manifest
sed '/Depends/d' -i $manifest
sed '/Status/d' -i $manifest
@@ -115,16 +117,16 @@ rootfs_ipk_write_manifest() {
}
remove_packaging_data_files() {
- rm -rf ${IMAGE_ROOTFS}/usr/lib/opkg/
+ rm -rf ${IMAGE_ROOTFS}${opkglibdir}
# We need the directory for the package manager lock
- mkdir ${IMAGE_ROOTFS}/usr/lib/opkg
+ mkdir ${IMAGE_ROOTFS}${opkglibdir}
}
install_all_locales() {
PACKAGES_TO_INSTALL=""
- INSTALLED_PACKAGES=`grep ^Package: ${IMAGE_ROOTFS}${libdir}/opkg/status |sed "s/^Package: //"|egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"`
+ INSTALLED_PACKAGES=`grep ^Package: ${IMAGE_ROOTFS}${opkglibdir}/status |sed "s/^Package: //"|egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"`
for pkg in $INSTALLED_PACKAGES
do