[oe-commits] Martin Jansa : rootfs_ipk.bbclass: always specify tmp_dir in opkg-cl call with -t parameter

git version control git at git.openembedded.org
Wed Feb 24 19:14:39 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 046c7c5f1cdec5c92f6a365d8846ba33986277b6
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=046c7c5f1cdec5c92f6a365d8846ba33986277b6

Author: Martin Jansa <Martin.Jansa at gmail.com>
Date:   Wed Feb 24 19:19:03 2010 +0100

rootfs_ipk.bbclass: always specify tmp_dir in opkg-cl call with -t parameter

* When option tmp_dir is used in opkg.conf installed on rootfs then it's
  used also in do_rootfs call and points to probably non-existent directory
  on buildhost like /var/lib/opkg/tmp.
* The value of tmp_dir from rootfs is used even with another config file
  specified with -c parameter
* Before this, it was using default value (/tmp) on buildhost, now it will use
  own "${IMAGE_ROOTFS}-tmp" and remove it after do_rootfs finish
  (usually already empty inside, cleaned by opkg itself)
* Similar patch for testlab.bbclass will follow

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 classes/rootfs_ipk.bbclass |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
index 16dd511..38d6121 100644
--- a/classes/rootfs_ipk.bbclass
+++ b/classes/rootfs_ipk.bbclass
@@ -7,7 +7,8 @@
 
 do_rootfs[depends] += "opkg-native:do_populate_staging"
 
-IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)}"
+IPKG_TMP_DIR = "${IMAGE_ROOTFS}-tmp"
+IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} -t ${IPKG_TMP_DIR} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)}"
 
 PACKAGE_INSTALL_NO_DEPS ?= "0"
 
@@ -31,6 +32,7 @@ fakeroot rootfs_ipk_do_rootfs () {
 	package_generate_ipkg_conf
 
 	mkdir -p ${T}
+	mkdir -p ${IPKG_TMP_DIR}
 	mkdir -p ${IMAGE_ROOTFS}${libdir}/opkg/
 
 	STATUS=${IMAGE_ROOTFS}${libdir}/opkg/status
@@ -100,6 +102,7 @@ fakeroot rootfs_ipk_do_rootfs () {
 	${ROOTFS_POSTPROCESS_COMMAND}
 	
 	log_check rootfs 	
+	rm -rf ${IPKG_TMP_DIR}
 }
 
 rootfs_ipk_log_check() {





More information about the Openembedded-commits mailing list