Patchwork lsof: avoid creating directory ${DL_DIR}/${WORKDIR}/lsof_${PV}

login
register
mail settings
Submitter Bian Naimeng
Date Aug. 9, 2013, 3:09 a.m.
Message ID <52045D74.2040703@cn.fujitsu.com>
Download mbox | patch
Permalink /patch/55369/
State New
Headers show

Comments

Bian Naimeng - Aug. 9, 2013, 3:09 a.m.
lsof: avoid creating directory ${DL_DIR}/${WORKDIR}/lsof_${PV}.

Set LOCALSRC as SRC_URI will make do_unpack mkdir ${DL_DIR}/${WORKDIR}/lsof_${PV},
it's not good while multiuser sharing ${DL_DIR}.

Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>

---
 meta/recipes-extended/lsof/lsof_4.87.bb |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

Patch

diff --git a/meta/recipes-extended/lsof/lsof_4.87.bb b/meta/recipes-extended/lsof/lsof_4.87.bb
index 2f425aa..222ede8 100644
--- a/meta/recipes-extended/lsof/lsof_4.87.bb
+++ b/meta/recipes-extended/lsof/lsof_4.87.bb
@@ -10,17 +10,16 @@  SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2"
 SRC_URI[md5sum] = "80e2a76d0e05826db910ec88e631296c"
 SRC_URI[sha256sum] = "dfdd3709d82bc79ccdf3e404b84aafa9aede5948642a824ecaefd0aac589da2c"
 
-LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar"
 S = "${WORKDIR}/lsof_${PV}_src"
 
-LIC_FILES_CHKSUM = "file://${S}/00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a"
+LIC_FILES_CHKSUM = "file://00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a"
 
-python do_unpack () {
-    bb.build.exec_func('base_do_unpack', d)
-    src_uri = d.getVar('SRC_URI')
-    d.setVar('SRC_URI', '${LOCALSRC}')
-    bb.build.exec_func('base_do_unpack', d)
-    d.setVar('SRC_URI', src_uri)
+python do_unpack_append () {
+    bb.build.exec_func('do_unpack_realsrc', d)
+}
+
+do_unpack_realsrc () {
+	tar x --no-same-owner -f ${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar -C ${WORKDIR}
 }
 
 export LSOF_OS = "${TARGET_OS}"