From d1e6f49a6473df3c626100ba01b27485f735c33b Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Mon, 19 Sep 2011 16:00:38 +0800 Subject: 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 --- meta/classes/rootfs_deb.bbclass | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'meta/classes/rootfs_deb.bbclass') 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} -- cgit v1.2.3