Bug 4407

Summary: Check if /dev/shm exists to avoid cryptic error
Product: [Build System, Metadata & Runtime] BitBake Reporter: Paul Eggleton <bluelightning>
Component: bitbakeAssignee: Paul Eggleton <bluelightning>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: ionutx.chisanovici, meta.mr.watcher, meta.watcher, poky.bs.watcher, poky.watcher, richard.purdie
Version: 1.5   
Target Milestone: 1.5 M1   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Paul Eggleton 2013-04-24 10:36:18 UTC
If /dev/shm 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. We should just check on startup whether this is present e.g. in sanity.bbclass, and bail out with an appropriate message if it isn't.
Comment 2 Ionut Chisanovici 2013-10-08 13:21:50 UTC
Verified

[ionut@ionut-fedora build]$ bitbake core-image-minimal
FATAL: /dev/shm does not exist or is not writable
[ionut@ionut-fedora build]$ cat /proc/mounts | grep shm
tmpfs /dev/shm tmpfs ro,seclabel,relatime 0 0
[ionut@ionut-fedora build]$