diff options
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/build.py | 1 | ||||
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 7947906ab2..f69464c60b 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -463,6 +463,7 @@ def add_tasks(tasklist, d): | |||
463 | getTask('nostamp') | 463 | getTask('nostamp') |
464 | getTask('fakeroot') | 464 | getTask('fakeroot') |
465 | getTask('noexec') | 465 | getTask('noexec') |
466 | getTask('umask') | ||
466 | task_deps['parents'][task] = [] | 467 | task_deps['parents'][task] = [] |
467 | for dep in flags['deps']: | 468 | for dep in flags['deps']: |
468 | dep = data.expand(dep, d) | 469 | dep = data.expand(dep, d) |
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 7a17fce789..b801877e16 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -1063,8 +1063,16 @@ class RunQueueExecute: | |||
1063 | # a fork() or exec*() activates PSEUDO... | 1063 | # a fork() or exec*() activates PSEUDO... |
1064 | 1064 | ||
1065 | envbackup = {} | 1065 | envbackup = {} |
1066 | umask = None | ||
1066 | 1067 | ||
1067 | taskdep = self.rqdata.dataCache.task_deps[fn] | 1068 | taskdep = self.rqdata.dataCache.task_deps[fn] |
1069 | if 'umask' in taskdep and taskname in taskdep['umask']: | ||
1070 | # umask might come in as a number or text string.. | ||
1071 | try: | ||
1072 | umask = int(taskdep['umask'][taskname],8) | ||
1073 | except TypeError: | ||
1074 | umask = taskdep['umask'][taskname] | ||
1075 | |||
1068 | if 'fakeroot' in taskdep and taskname in taskdep['fakeroot']: | 1076 | if 'fakeroot' in taskdep and taskname in taskdep['fakeroot']: |
1069 | envvars = (self.rqdata.dataCache.fakerootenv[fn] or "").split() | 1077 | envvars = (self.rqdata.dataCache.fakerootenv[fn] or "").split() |
1070 | for key, value in (var.split('=') for var in envvars): | 1078 | for key, value in (var.split('=') for var in envvars): |
@@ -1103,6 +1111,9 @@ class RunQueueExecute: | |||
1103 | newsi = os.open(os.devnull, os.O_RDWR) | 1111 | newsi = os.open(os.devnull, os.O_RDWR) |
1104 | os.dup2(newsi, sys.stdin.fileno()) | 1112 | os.dup2(newsi, sys.stdin.fileno()) |
1105 | 1113 | ||
1114 | if umask: | ||
1115 | os.umask(umask) | ||
1116 | |||
1106 | bb.data.setVar("BB_WORKERCONTEXT", "1", self.cooker.configuration.data) | 1117 | bb.data.setVar("BB_WORKERCONTEXT", "1", self.cooker.configuration.data) |
1107 | bb.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY", self, self.cooker.configuration.data) | 1118 | bb.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY", self, self.cooker.configuration.data) |
1108 | bb.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY2", fn, self.cooker.configuration.data) | 1119 | bb.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY2", fn, self.cooker.configuration.data) |