Comments
Patch
@@ -13,6 +13,16 @@ inherit logging
OE_IMPORTS += "os sys time oe.path oe.utils oe.data oe.packagegroup"
OE_IMPORTS[type] = "list"
+# There are a few key items we need to setup in the environment
+# in order to get consistent builds. Do them here.
+python oe_setup_env () {
+ if isinstance(e, bb.event.ConfigParsed) and bb.data.getVar("BB_WORKERCONTEXT", e.data, True) != "1":
+ import os
+ os.umask(0022)
+}
+
+addhandler oe_setup_env
+
def oe_import(d):
import os, sys
@@ -224,11 +224,6 @@ def check_sanity(e):
if os.path.basename(os.readlink('/bin/sh')) == 'dash':
messages = messages + "Using dash as /bin/sh causes various subtle build problems, please use bash instead (e.g. 'dpkg-reconfigure dash' on an Ubuntu system.\n"
- omask = os.umask(022)
- if omask & 0755:
- messages = messages + "Please use a umask which allows a+rx and u+rwx\n"
- os.umask(omask)
-
oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True )
if not oes_bb_conf:
messages = messages + 'You do not include OpenEmbeddeds version of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n'
In order for the build system to consistently create directories and files with reasonable default permissions, we need to set the umask to a known value, 022. Prior to this patch we used the users umask and just verified it was "compatible" with 022... Note, this patch sets the umask -once- in the main bb thread. Also remove the sanity check, as it's no longer needed. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> --- meta/classes/base.bbclass | 10 ++++++++++ meta/classes/sanity.bbclass | 5 ----- 2 files changed, 10 insertions(+), 5 deletions(-)