sanity.bbclass: Ensure tmpdir exists when running the check

This avoids tracebacks from bitbake if the directory doesn't already
exist.

[YOCTO #3640]

(From OE-Core rev: 2d0f0d39dacc57c2c6eefade0b06aed4dc9814d5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2013-01-21 22:49:08 +00:00
parent 881f4b9bdd
commit dd3b62d646

View File

@ -566,6 +566,7 @@ def check_sanity(sanity_data):
if (saved_tmpdir != tmpdir):
messages = messages + "Error, TMPDIR has changed location. You need to either move it back to %s or rebuild\n" % saved_tmpdir
else:
bb.utils.mkdirhier(tmpdir)
f = file(checkfile, "w")
f.write(tmpdir)
f.close()