Skip to contentSkip to conversation

bitbake.conf: define WORKDIR in terms of BASE_WORKDIR

PATCH New Ross Burton 1 participant 2 messages Sep 19, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 bitbake.conf: define WORKDIR in terms of BASE_WORKDIR

To make it easier to move WORKDIR, define it using the new variable BASE_WORKDIR, which is the root of the work directory.

---
 meta/conf/bitbake.conf |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/conf/bitbake.conf +2 -1
index 58d0c20..47d2171 100644
@@ -339,7 +339,8 @@ HGDIR = "${CO_DIR}/hg"
 STAMPS_DIR ?= "${TMPDIR}/stamps"
 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
 STAMPCLEAN = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/*-*"
-WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
+BASE_WORKDIR ?= "${TMPDIR}/work"
+WORKDIR = "${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
 T = "${WORKDIR}/temp"
 D = "${WORKDIR}/image"
 S = "${WORKDIR}/${BP}"
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/2 insane: don't abort if workdir is not TMPDIR/work

The BASE_WORKDIR variable can be used instead of enforcing WORKDIR being TMPDIR/work (and aborting the build if it isn't).

---
 meta/classes/insane.bbclass |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
meta/classes/insane.bbclass +1 -4
index 524cdca..a784aff 100644
@@ -175,10 +175,7 @@ def package_qa_check_rpath(file,name, d, elf, messages):
     if os.path.islink(file):
         return
 
-    bad_dirs = [d.getVar('TMPDIR', True) + "/work", d.getVar('STAGING_DIR_TARGET', True)]
-
-    if not bad_dirs[0] in d.getVar('WORKDIR', True):
-        bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check")
+    bad_dirs = [d.getVar('BASE_WORKDIR', True), d.getVar('STAGING_DIR_TARGET', True)]
 
     phdrs = elf.run_objdump("-p", d)
 
Signature · 1 line
1.7.10.4