Openembedded Core Discussions
 help / color / mirror / Atom feed
* [RFC][PATCH 0/2] WORKDIR and insane tweaks
@ 2013-08-13 10:10 Ross Burton
  2013-08-13 10:10 ` [PATCH 1/2] bitbake.conf: define WORKDIR in terms of BASE_WORKDIR Ross Burton
  2013-08-13 10:11 ` [PATCH 2/2] insane: don't abort if workdir is not TMPDIR/work Ross Burton
  0 siblings, 2 replies; 3+ messages in thread
From: Ross Burton @ 2013-08-13 10:10 UTC (permalink / raw)
  To: openembedded-core

Hi,

Last night I was attempting a build with WORKDIR in a tmpfs to see what impact
it made on build time (the results were fairly interesting, I'll write them up
shortly).

I noticed that to move WORKDIR I had to replicate the full WORKDIR path logic,
which was a bit irritating but not that serious.  I then noticed that the
"rpaths" sanity test checks that WORKDIR is in fact TMPDIR/work, and does a
bb.fatal() if it isn't.  My best understanding here is that the check needs to
know the base of all possible WORKDIRS so that it can check for linkage directly
into another package's work directory.

Assuming that understanding is correct then both problems can be resolved with a
BASE_WORKDIR variable, which this series adds to bitbake.conf and then uses in
insane.bbclass.

Ross

The following changes since commit 16d522bcd1f1b7741577fa31fab7e2129da0cae9:

  maintainers.inc: reassign maintainers, remove obsolete recipes (2013-08-12 13:13:05 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib ross/workdir

for you to fetch changes up to e91cbd17131101d1c470669acce66682ae06960a:

  insane: don't abort if workdir is not TMPDIR/work (2013-08-13 10:36:53 +0100)

----------------------------------------------------------------
Ross Burton (2):
      bitbake.conf: define WORKDIR in terms of BASE_WORKDIR
      insane: don't abort if workdir is not TMPDIR/work

 meta/classes/insane.bbclass |    5 +----
 meta/conf/bitbake.conf      |    3 ++-
 2 files changed, 3 insertions(+), 5 deletions(-)

Ross Burton (2):
  bitbake.conf: define WORKDIR in terms of BASE_WORKDIR
  insane: don't abort if workdir is not TMPDIR/work

 meta/classes/insane.bbclass |    5 +----
 meta/conf/bitbake.conf      |    3 ++-
 2 files changed, 3 insertions(+), 5 deletions(-)

-- 
1.7.10.4



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] bitbake.conf: define WORKDIR in terms of BASE_WORKDIR
  2013-08-13 10:10 [RFC][PATCH 0/2] WORKDIR and insane tweaks Ross Burton
@ 2013-08-13 10:10 ` Ross Burton
  2013-08-13 10:11 ` [PATCH 2/2] insane: don't abort if workdir is not TMPDIR/work Ross Burton
  1 sibling, 0 replies; 3+ messages in thread
From: Ross Burton @ 2013-08-13 10:10 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/conf/bitbake.conf |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 07eb473..9e2696b 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -338,8 +338,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}"
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] insane: don't abort if workdir is not TMPDIR/work
  2013-08-13 10:10 [RFC][PATCH 0/2] WORKDIR and insane tweaks Ross Burton
  2013-08-13 10:10 ` [PATCH 1/2] bitbake.conf: define WORKDIR in terms of BASE_WORKDIR Ross Burton
@ 2013-08-13 10:11 ` Ross Burton
  1 sibling, 0 replies; 3+ messages in thread
From: Ross Burton @ 2013-08-13 10:11 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/insane.bbclass |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index aa02985..865db5e 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -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)
 
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-08-13 10:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-13 10:10 [RFC][PATCH 0/2] WORKDIR and insane tweaks Ross Burton
2013-08-13 10:10 ` [PATCH 1/2] bitbake.conf: define WORKDIR in terms of BASE_WORKDIR Ross Burton
2013-08-13 10:11 ` [PATCH 2/2] insane: don't abort if workdir is not TMPDIR/work Ross Burton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox