[OE-core] [PATCH] bitbake.conf: point PERSISTENT_DIR outside TMPDIR

Martin Jansa martin.jansa at gmail.com
Fri Mar 4 10:40:47 UTC 2011


* sanity check warning user that he still has peristent cache in old location
* similar patch was sent to OE, to keep PERSISTENT_DIR location consistent
  http://lists.linuxtogo.org/pipermail/openembedded-devel/2011-March/030623.html

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 meta/classes/sanity.bbclass |    8 ++++++++
 meta/conf/bitbake.conf      |    2 +-
 meta/conf/sanity.conf       |    1 +
 3 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 64af555..9a0dfcc 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -302,6 +302,14 @@ def check_sanity(e):
     elif oeroot.find (' ') != -1:
         messages = messages + "Error, you have a space in your POKYBASE directory path. Please move Poky to a directory which doesn't include a space."
 
+    #
+    # Check there isn't old persistent cache
+    #
+    persistent_dir = data.getVar('PERSISTENT_DIR', e.data, True)
+    persistent_cache_filename = data.getVar('SANITY_PERSIST_DATA_FILE', e.data, True)
+    if os.path.exists(tmpdir + '/cache/' + persistent_cache_filename):
+        messages = messages + "Error, persistent cache file '%s' exists in old location '%s', please migrate it to new location '%s' and merge them together if you have one for each MACHINE.\n" % (persistent_cache_filename, tmpdir + '/cache/', persistent_dir)
+
     if messages != "":
         raise_sanity_error(messages)
 
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 55db1ab..1fdd4c5 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -270,7 +270,7 @@ FILESDIR = "${@bb.which(bb.data.getVar('FILESPATH', d, 1), '.')}"
 TMPDIR ?= "${TOPDIR}/tmp"
 CACHE = "${TMPDIR}/cache${@['', '/' + str(bb.data.getVar('MACHINE', d, 1))][bool(bb.data.getVar('MACHINE', d, 1))]}${@['', '/' + str(bb.data.getVar('SDKMACHINE', d, 1))][bool(bb.data.getVar('SDKMACHINE', d, 1))]}"
 # The persistent cache should be shared by all builds
-PERSISTENT_DIR = "${TMPDIR}/cache"
+PERSISTENT_DIR = "${TOPDIR}/conf/persistent"
 LOG_DIR = "${TMPDIR}/log"
 CO_DIR = "${DL_DIR}"
 CVSDIR = "${CO_DIR}/cvs"
diff --git a/meta/conf/sanity.conf b/meta/conf/sanity.conf
index fcaed11..46b542d 100644
--- a/meta/conf/sanity.conf
+++ b/meta/conf/sanity.conf
@@ -6,6 +6,7 @@
 BB_MIN_VERSION = "1.8.10"
 
 SANITY_ABIFILE = "${TMPDIR}/abi_version"
+SANITY_PERSIST_DATA_FILE = "bb_persist_data.sqlite3"
 
 SANITY_VERSION = "1"
 POKY_CONF_VERSION  = "1"
-- 
1.7.4.1





More information about the Openembedded-core mailing list