diff options
author | Richard Purdie <richard@openedhand.com> | 2008-01-31 15:18:54 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-01-31 15:18:54 +0000 |
commit | 27793088ad34dc7cbff8fd83322ca1251b8ab7d0 (patch) | |
tree | 6b3d06876d89d50bcc2a3b589485e7c4c07a1a6e /meta/classes | |
parent | d6e99e2c08791f6d5859ee925a4dae78c52fcd97 (diff) | |
download | poky-27793088ad34dc7cbff8fd83322ca1251b8ab7d0.tar.gz |
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
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/sanity.bbclass | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 957e24e1e1..85a38ba285 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -108,7 +108,21 @@ def check_sanity(e): | |||
108 | 108 | ||
109 | oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True ) | 109 | oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True ) |
110 | if not oes_bb_conf: | 110 | if not oes_bb_conf: |
111 | messages = messages + 'You do not include OpenEmbeddeds version of conf/bitbake.conf\n' | 111 | messages = messages + 'You do not include OpenEmbeddeds version of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n' |
112 | |||
113 | # | ||
114 | # Check that TMPDIR hasn't changed location since the last time we were run | ||
115 | # | ||
116 | tmpdir = data.getVar('TMPDIR', e.data, True) | ||
117 | checkfile = os.path.join(tmpdir, "saved_tmpdir") | ||
118 | if os.path.exists(checkfile): | ||
119 | f = file(checkfile, "r") | ||
120 | if (f.read().strip() != tmpdir): | ||
121 | messages = messages + "Error, TMPDIR has changed location. You need to either move it back to %s or rebuild\n" % tmpdir | ||
122 | else: | ||
123 | f = file(checkfile, "w") | ||
124 | f.write(tmpdir) | ||
125 | f.close() | ||
112 | 126 | ||
113 | if messages != "": | 127 | if messages != "": |
114 | raise_sanity_error(messages) | 128 | raise_sanity_error(messages) |