Patchwork [2/4] Revert "classes/base.bbclass: Add umask"

login
register
mail settings
Submitter Mark Hatle
Date June 22, 2011, 11:23 p.m.
Message ID <ca4faeb0b1584c3fffb6275354dc2ac07f0cd737.1308784531.git.mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/6385/
State New, archived
Headers show

Comments

Mark Hatle - June 22, 2011, 11:23 p.m.
This reverts commit d8470b6a8efdbba04cef5d4dc1ce12720fe83621.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/base.bbclass   |   10 ----------
 meta/classes/sanity.bbclass |    5 +++++
 2 files changed, 5 insertions(+), 10 deletions(-)

Patch

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 11ff0e0..119b052 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -13,16 +13,6 @@  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
 
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index cd883be..fc005aa 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -224,6 +224,11 @@  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'