[oe-commits] Martin Jansa : sanity.bbclass: add check for changed bb_persist_data. sqlite3 location

git version control git at git.openembedded.org
Thu Mar 24 20:04:00 UTC 2011


Module: openembedded.git
Branch: testing-next
Commit: 3e7790be2b18e0a65cc5415b468b1fda7c9c58ab
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=3e7790be2b18e0a65cc5415b468b1fda7c9c58ab

Author: Martin Jansa <martin.jansa at gmail.com>
Date:   Fri Feb 25 23:27:16 2011 +0000

sanity.bbclass: add check for changed bb_persist_data.sqlite3 location

* 4f883343de0427769de3df96ed8adaa589279112 could move
  bb_persist_data.sqlite3 from default CACHE tmp/cache/machine/
  to global tmp/cache/
* because I have 1st report of wrong SRCPV behavior, add sanity check from
  http://patches.openembedded.org/patch/823/
  even without moving it outside TMPDIR, in case of CACHE != PERSISTENT_DIR

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 classes/sanity.bbclass |    9 +++++++++
 conf/sanity.conf       |    1 +
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass
index 1e6b170..2cf6c7f 100644
--- a/classes/sanity.bbclass
+++ b/classes/sanity.bbclass
@@ -186,6 +186,15 @@ def check_sanity(e):
 			messages = messages + "Error, Your PACKAGE_ARCHS field contains duplicates. Perhaps you set PACKAGE_EXTRA_ARCHS twice accidently through some tune file?\n"
 			break
 
+	#
+	# Check there isn't old persistent cache
+	#
+	cache = data.getVar('CACHE', e.data, True)
+	persistent_dir = data.getVar('PERSISTENT_DIR', e.data, True)
+	persistent_cache_filename = data.getVar('SANITY_PERSIST_DATA_FILE', e.data, True)
+	if cache != persistent_dir and os.path.exists(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, cache, persistent_dir)
+
 	if messages != "":
 		raise_sanity_error(messages)
 
diff --git a/conf/sanity.conf b/conf/sanity.conf
index e9902f6..c1ac332 100644
--- a/conf/sanity.conf
+++ b/conf/sanity.conf
@@ -7,5 +7,6 @@ BB_MIN_VERSION = "1.10.2"
 
 SANITY_ABIFILE = "${TMPDIR}/abi_version"
 SANITY_PRFILE = "${TMPDIR}/distro_pr"
+SANITY_PERSIST_DATA_FILE = "bb_persist_data.sqlite3"
 
 INHERIT += "sanity"





More information about the Openembedded-commits mailing list