Patchwork [bitbake-devel] bin/bitbake: add a check for /dev/shm existing

login
register
mail settings
Submitter Paul Eggleton
Date May 9, 2013, 10:22 a.m.
Message ID <1368094946-14686-1-git-send-email-paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/49621/
State Accepted
Commit e7460d01f281f913a94192e1f4bd20688164bdd4
Headers show

Comments

Paul Eggleton - May 9, 2013, 10:22 a.m.
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>
---
 bin/bitbake | 4 ++++
 1 file changed, 4 insertions(+)

Patch

diff --git a/bin/bitbake b/bin/bitbake
index 0e69207..ae6c2cb 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