Patchwork [1/1] ccache: allow CCACHE_DIR to be overriden

login
register
mail settings
Submitter wenzong.fan@windriver.com
Date July 26, 2013, 7:35 a.m.
Message ID <e44d86edd598d06c444ea5cde10b50a1cd1727e3.1374823720.git.wenzong.fan@windriver.com>
Download mbox | patch
Permalink /patch/54543/
State New
Headers show

Comments

wenzong.fan@windriver.com - July 26, 2013, 7:35 a.m.
From: Wenzong Fan <wenzong.fan@windriver.com>

Use weaker assignment for CCACHE_DIR to allow users to override it
if desired.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
---
 meta/classes/ccache.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Enrico Scholz - July 31, 2013, 10:05 a.m.
<wenzong.fan-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> writes:

> Use weaker assignment for CCACHE_DIR to allow users to override it
> if desired.
>
> -export CCACHE_DIR = "${TMPDIR}/ccache/${MULTIMACH_HOST_SYS}/${PN}"
> +export CCACHE_DIR ?= "${TMPDIR}/ccache/${MULTIMACH_HOST_SYS}/${PN}"

This can be a dangerous change and probably does not have the intended
effect ((project) global ccache dir) due to

| do_clean[cleandirs] += "${CCACHE_DIR}"


imo, this class should be removed completely (${PN} local ccache dirs do
not make any sense) and the only useful part

| CCACHE_DISABLE[unexport] = "1"

should be solved by http://patchwork.openembedded.org/patch/32787/



Enrico

Patch

diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
index cd06a4b..ca3ca43 100644
--- a/meta/classes/ccache.bbclass
+++ b/meta/classes/ccache.bbclass
@@ -1,5 +1,5 @@ 
 CCACHE = "${@bb.which(d.getVar('PATH', True), 'ccache') and 'ccache '}"
-export CCACHE_DIR = "${TMPDIR}/ccache/${MULTIMACH_HOST_SYS}/${PN}"
+export CCACHE_DIR ?= "${TMPDIR}/ccache/${MULTIMACH_HOST_SYS}/${PN}"
 CCACHE_DISABLE[unexport] = "1"
 
 do_configure[dirs] =+ "${CCACHE_DIR}"