[oe-commits] Martin Jansa : opkg: add tmp_dir option to opkg.conf for SHR

git version control git at git.openembedded.org
Thu Feb 25 12:22:12 UTC 2010


Module: openembedded.git
Branch: shr/testing2010
Commit: 45809c052d7d6030675b9da0a95db705fafbc740
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=45809c052d7d6030675b9da0a95db705fafbc740

Author: Martin Jansa <Martin.Jansa at gmail.com>
Date:   Wed Feb 24 10:16:41 2010 +0100

opkg: add tmp_dir option to opkg.conf for SHR

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

---

 recipes/opkg/opkg-collateral.bb      |   11 ++++++++++-
 recipes/opkg/opkg-collateral/tmp_dir |    4 ++++
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/recipes/opkg/opkg-collateral.bb b/recipes/opkg/opkg-collateral.bb
index 401e76e..a7ec321 100644
--- a/recipes/opkg/opkg-collateral.bb
+++ b/recipes/opkg/opkg-collateral.bb
@@ -1,11 +1,12 @@
 DESCRIPTION = "opkg configuration files"
 SECTION = "base"
 LICENSE = "MIT"
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "file://opkg.conf.comments \
 	   file://lists \
 	   file://dest \
+	   file://tmp_dir \
 	   file://src "
 
 do_compile () {
@@ -15,9 +16,17 @@ do_compile () {
 	cat ${WORKDIR}/lists	>>${WORKDIR}/opkg.conf
 }
 
+do_compile_append_shr () {
+	cat ${WORKDIR}/tmp_dir	>>${WORKDIR}/opkg.conf
+}
+
 do_install () {
 	install -d ${D}${sysconfdir}/opkg
 	install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
 }
 
+do_install_append_shr () {
+	install -d ${D}/var/lib/opkg/tmp
+}
+
 CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"
diff --git a/recipes/opkg/opkg-collateral/tmp_dir b/recipes/opkg/opkg-collateral/tmp_dir
new file mode 100644
index 0000000..7ba6abf
--- /dev/null
+++ b/recipes/opkg/opkg-collateral/tmp_dir
@@ -0,0 +1,4 @@
+# We have whole /tmp in volatile tmpfs which is better than wear leveling NAND or uSD
+# But also bad for big upgrades where tmpfs eats whole memory,
+# device starts swapping (possibly using more NAND/uSD than temporary unpack) and then segfaults because of lack of space
+option tmp_dir /var/lib/opkg/tmp





More information about the Openembedded-commits mailing list