summaryrefslogtreecommitdiffstats
path: root/bin/bitbake
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-05-09 11:22:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-09 14:13:58 +0100
commite7460d01f281f913a94192e1f4bd20688164bdd4 (patch)
tree4f832e5e60cae589a7af86c04ed559f6f86a9ba2 /bin/bitbake
parent9bc92d0210e13e4cc98727f6c9ec2f47c2221e77 (diff)
downloadbitbake-contrib-e7460d01f281f913a94192e1f4bd20688164bdd4.tar.gz
bin/bitbake: add a check for /dev/shm existing
Python multiprocessing needs /dev/shm, and if it doesn't exist (e.g. in a chroot environment) or is not writable, you'll get "OSError: [Errno 38] Function not implemented" or "OSError: [Errno 13] Permission denied" with a traceback, which doesn't really help to explain what is wrong. Implements [YOCTO #4407]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin/bitbake')
-rwxr-xr-xbin/bitbake4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/bitbake b/bin/bitbake
index e05ff5bd3..1f9bbc403 100755
--- a/bin/bitbake
+++ b/bin/bitbake
@@ -43,6 +43,10 @@ from bb import server
__version__ = "1.19.0"
logger = logging.getLogger("BitBake")
+# Python multiprocessing requires /dev/shm
+if not os.access('/dev/shm', os.W_OK | os.X_OK):
+ sys.exit("FATAL: /dev/shm does not exist or is not writable")
+
# Unbuffer stdout to avoid log truncation in the event
# of an unorderly exit as well as to provide timely
# updates to log files for use with tail