summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorDexuan Cui <dexuan.cui@intel.com>2011-09-19 16:00:38 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-21 13:27:35 +0100
commitd1e6f49a6473df3c626100ba01b27485f735c33b (patch)
treef6e3a30376f8367fd9cfdd9e29274c55723e715c /meta/classes
parent9f1b4e5923c60cd4215b0ca4da2cab6245e54ccb (diff)
downloadopenembedded-core-d1e6f49a6473df3c626100ba01b27485f735c33b.tar.gz
openembedded-core-d1e6f49a6473df3c626100ba01b27485f735c33b.tar.bz2
openembedded-core-d1e6f49a6473df3c626100ba01b27485f735c33b.zip
deb packages support: switch from /var/dpkg to /var/lib/dpkg
[YOCTO #1086] The pach was backported from OE: http://git.openembedded.net/cgit.cgi/openembedded/commit/?id=41e0fbf792037f249d1b8d283b3de81718887c9f Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package_deb.bbclass10
-rw-r--r--meta/classes/populate_sdk_deb.bbclass4
-rw-r--r--meta/classes/rootfs_deb.bbclass20
3 files changed, 17 insertions, 17 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 5a32047322..6733e64534 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -135,11 +135,11 @@ package_install_internal_deb () {
export APT_CONFIG="${STAGING_ETCDIR_NATIVE}/apt/apt-${task}.conf"
- mkdir -p ${target_rootfs}/var/dpkg/info
- mkdir -p ${target_rootfs}/var/dpkg/updates
+ mkdir -p ${target_rootfs}/var/lib/dpkg/info
+ mkdir -p ${target_rootfs}/var/lib/dpkg/updates
- > ${target_rootfs}/var/dpkg/status
- > ${target_rootfs}/var/dpkg/available
+ > ${target_rootfs}/var/lib/dpkg/status
+ > ${target_rootfs}/var/lib/dpkg/available
apt-get update
@@ -179,7 +179,7 @@ package_install_internal_deb () {
done
# Mark all packages installed
- sed -i -e "s/Status: install ok unpacked/Status: install ok installed/;" ${target_rootfs}/var/dpkg/status
+ sed -i -e "s/Status: install ok unpacked/Status: install ok installed/;" ${target_rootfs}/var/lib/dpkg/status
}
deb_log_check() {
diff --git a/meta/classes/populate_sdk_deb.bbclass b/meta/classes/populate_sdk_deb.bbclass
index 2cff69e827..be7b5520c4 100644
--- a/meta/classes/populate_sdk_deb.bbclass
+++ b/meta/classes/populate_sdk_deb.bbclass
@@ -52,8 +52,8 @@ fakeroot populate_sdk_deb () {
populate_sdk_post_deb ${SDK_OUTPUT}/${SDKPATHNATIVE}
#move remainings
- install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}/var/dpkg
- mv ${SDK_OUTPUT}/var/dpkg/* ${SDK_OUTPUT}/${SDKPATHNATIVE}/var/dpkg
+ install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}/var/lib/dpkg
+ mv ${SDK_OUTPUT}/var/lib/dpkg/* ${SDK_OUTPUT}/${SDKPATHNATIVE}/var/lib/dpkg
rm -rf ${SDK_OUTPUT}/var
populate_sdk_log_check populate_sdk
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index e03e80bdb0..bab8e1e8c7 100644
--- a/meta/classes/rootfs_deb.bbclass
+++ b/meta/classes/rootfs_deb.bbclass
@@ -13,7 +13,7 @@ opkglibdir = "${localstatedir}/lib/opkg"
fakeroot rootfs_deb_do_rootfs () {
set +e
- mkdir -p ${IMAGE_ROOTFS}/var/dpkg/alternatives
+ mkdir -p ${IMAGE_ROOTFS}/var/lib/dpkg/alternatives
# update index
package_update_index_deb
@@ -36,15 +36,15 @@ fakeroot rootfs_deb_do_rootfs () {
export OPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
_flag () {
- sed -i -e "/^Package: $2\$/{n; s/Status: install ok .*/Status: install ok $1/;}" ${IMAGE_ROOTFS}/var/dpkg/status
+ sed -i -e "/^Package: $2\$/{n; s/Status: install ok .*/Status: install ok $1/;}" ${IMAGE_ROOTFS}/var/lib/dpkg/status
}
_getflag () {
- cat ${IMAGE_ROOTFS}/var/dpkg/status | sed -n -e "/^Package: $2\$/{n; s/Status: install ok .*/$1/; p}"
+ cat ${IMAGE_ROOTFS}/var/lib/dpkg/status | sed -n -e "/^Package: $2\$/{n; s/Status: install ok .*/$1/; p}"
}
# Attempt to run preinsts
# Mark packages with preinst failures as unpacked
- for i in ${IMAGE_ROOTFS}/var/dpkg/info/*.preinst; do
+ for i in ${IMAGE_ROOTFS}/var/lib/dpkg/info/*.preinst; do
if [ -f $i ] && ! sh $i; then
_flag unpacked `basename $i .preinst`
fi
@@ -52,7 +52,7 @@ fakeroot rootfs_deb_do_rootfs () {
# Attempt to run postinsts
# Mark packages with postinst failures as unpacked
- for i in ${IMAGE_ROOTFS}/var/dpkg/info/*.postinst; do
+ for i in ${IMAGE_ROOTFS}/var/lib/dpkg/info/*.postinst; do
if [ -f $i ] && ! sh $i configure; then
_flag unpacked `basename $i .postinst`
fi
@@ -65,12 +65,12 @@ fakeroot rootfs_deb_do_rootfs () {
# Hacks to allow opkg's update-alternatives and opkg to coexist for now
mkdir -p ${IMAGE_ROOTFS}${opkglibdir}
- if [ -e ${IMAGE_ROOTFS}/var/dpkg/alternatives ]; then
- rmdir ${IMAGE_ROOTFS}/var/dpkg/alternatives
+ if [ -e ${IMAGE_ROOTFS}/var/lib/dpkg/alternatives ]; then
+ rmdir ${IMAGE_ROOTFS}/var/lib/dpkg/alternatives
fi
- 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
+ ln -s ${opkglibdir}/alternatives ${IMAGE_ROOTFS}/var/lib/dpkg/alternatives
+ ln -s /var/lib/dpkg/info ${IMAGE_ROOTFS}${opkglibdir}/info
+ ln -s /var/lib/dpkg/status ${IMAGE_ROOTFS}${opkglibdir}/status
${ROOTFS_POSTPROCESS_COMMAND}