summaryrefslogtreecommitdiff
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
parentd46c362a46f26b38d8da30f6a83e7c0fdadda348 (diff)
downloadopenembedded-core-8ea7fa6d4c7734da6034d44f8b6d78d2993f1949.tar.gz
openembedded-core-8ea7fa6d4c7734da6034d44f8b6d78d2993f1949.tar.bz2
openembedded-core-8ea7fa6d4c7734da6034d44f8b6d78d2993f1949.tar.xz
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>
-rw-r--r--meta/classes/rootfs_deb.bbclass12
-rw-r--r--meta/classes/rootfs_ipk.bbclass18
-rw-r--r--meta/classes/rootfs_rpm.bbclass6
-rw-r--r--meta/packages/opkg/opkg.inc6
-rw-r--r--meta/packages/opkg/opkg_0.1.8.bb2
-rw-r--r--meta/packages/opkg/opkg_svn.bb2
6 files changed, 26 insertions, 20 deletions
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index 16b8a86a5..b33d153da 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/
}
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 0bfa49194..c9edec2b5 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
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 9c681f382..9cbfdd3db 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -20,6 +20,8 @@ AWKPOSTINSTSCRIPT = "${POKYBASE}/scripts/rootfs_rpm-extract-postinst.awk"
RPM_PREPROCESS_COMMANDS = "package_update_index_rpm; package_generate_rpm_conf"
RPM_POSTPROCESS_COMMANDS = ""
+opkglibdir = "${localstatedir}/lib/opkg"
+
fakeroot rootfs_rpm_do_rootfs () {
set +x
@@ -164,7 +166,7 @@ rootfs_rpm_log_check() {
remove_packaging_data_files() {
exit 1
- rm -rf ${IMAGE_ROOTFS}/usr/lib/opkg/
+ rm -rf ${IMAGE_ROOTFS}${opkglibdir}
}
install_all_locales() {
@@ -172,7 +174,7 @@ 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
diff --git a/meta/packages/opkg/opkg.inc b/meta/packages/opkg/opkg.inc
index 667b6386e..add1563c4 100644
--- a/meta/packages/opkg/opkg.inc
+++ b/meta/packages/opkg/opkg.inc
@@ -22,10 +22,10 @@ do_configure_prepend() {
inherit autotools pkgconfig
-target_libdir := "${libdir}"
+target_localstatedir := "${localstatedir}"
EXTRA_OECONF = "--with-opkglibdir=${localstatedir}/lib"
-EXTRA_OECONF_virtclass-native = "--with-opkglibdir=${target_libdir} --disable-gpg --disable-curl --disable-openssl"
-EXTRA_OECONF_virtclass-nativesdk = "--with-opkglibdir=${target_libdir} --disable-gpg --disable-curl --disable-openssl"
+EXTRA_OECONF_virtclass-native = "--with-opkglibdir=${target_localstatedir}/lib --disable-gpg --disable-curl --disable-openssl"
+EXTRA_OECONF_virtclass-nativesdk = "--with-opkglibdir=${target_localstatedir}/lib --disable-gpg --disable-curl --disable-openssl"
#PROVIDES_append_virtclass-native = "virtual/update-alternatives-native"
#RPROVIDES_${PN} += "update-alternatives-native"
diff --git a/meta/packages/opkg/opkg_0.1.8.bb b/meta/packages/opkg/opkg_0.1.8.bb
index 1d05ef802..4eb3ff9a1 100644
--- a/meta/packages/opkg/opkg_0.1.8.bb
+++ b/meta/packages/opkg/opkg_0.1.8.bb
@@ -13,7 +13,7 @@ SRC_URI = "http://opkg.googlecode.com/files/opkg-${PV}.tar.gz \
file://headerfix.patch \
"
-PR = "r2"
+PR = "r3"
PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth"
diff --git a/meta/packages/opkg/opkg_svn.bb b/meta/packages/opkg/opkg_svn.bb
index 1dc4c4800..518c76735 100644
--- a/meta/packages/opkg/opkg_svn.bb
+++ b/meta/packages/opkg/opkg_svn.bb
@@ -17,7 +17,7 @@ SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
S = "${WORKDIR}/trunk"
PV = "0.0+svnr${SRCREV}"
-PR = "r14"
+PR = "r15"
PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth"