summaryrefslogtreecommitdiff
path: root/meta/classes/rootfs_deb.bbclass
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/rootfs_deb.bbclass
parent9f1b4e5923c60cd4215b0ca4da2cab6245e54ccb (diff)
downloadopenembedded-core-d1e6f49a6473df3c626100ba01b27485f735c33b.tar.gz
openembedded-core-d1e6f49a6473df3c626100ba01b27485f735c33b.tar.bz2
openembedded-core-d1e6f49a6473df3c626100ba01b27485f735c33b.tar.xz
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/rootfs_deb.bbclass')
-rw-r--r--meta/classes/rootfs_deb.bbclass20
1 files changed, 10 insertions, 10 deletions
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index e03e80bdb..bab8e1e8c 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}