From 27793088ad34dc7cbff8fd83322ca1251b8ab7d0 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 31 Jan 2008 15:18:54 +0000 Subject: sanity.bbclass: Check TMPDIR doesn't change, error if it does git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3647 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- meta/classes/sanity.bbclass | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 957e24e1e..85a38ba28 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass @@ -108,7 +108,21 @@ def check_sanity(e): oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True ) if not oes_bb_conf: - messages = messages + 'You do not include OpenEmbeddeds version of conf/bitbake.conf\n' + messages = messages + 'You do not include OpenEmbeddeds version of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n' + + # + # Check that TMPDIR hasn't changed location since the last time we were run + # + tmpdir = data.getVar('TMPDIR', e.data, True) + checkfile = os.path.join(tmpdir, "saved_tmpdir") + if os.path.exists(checkfile): + f = file(checkfile, "r") + if (f.read().strip() != tmpdir): + messages = messages + "Error, TMPDIR has changed location. You need to either move it back to %s or rebuild\n" % tmpdir + else: + f = file(checkfile, "w") + f.write(tmpdir) + f.close() if messages != "": raise_sanity_error(messages) -- cgit v1.2.3