mirror of
https://git.yoctoproject.org/poky
synced 2026-03-16 04:09:39 +01:00
bitbake: bitbake-worker/runqueue: Add support for BB_DEFAULT_UMASK
Currently each task has to have a umask specified individually. This is leading to determinism issues since it is easy to miss specifying this for an extra task. Add support for specifing the default task umask globally which simplifies the problem. (Bitbake rev: 3e664599fd54a8a37ce587022fcbce5ca26f2ed3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -150,11 +150,15 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, taskha
|
||||
|
||||
taskdep = workerdata["taskdeps"][fn]
|
||||
if 'umask' in taskdep and taskname in taskdep['umask']:
|
||||
umask = taskdep['umask'][taskname]
|
||||
elif workerdata["umask"]:
|
||||
umask = workerdata["umask"]
|
||||
if umask:
|
||||
# umask might come in as a number or text string..
|
||||
try:
|
||||
umask = int(taskdep['umask'][taskname],8)
|
||||
umask = int(umask, 8)
|
||||
except TypeError:
|
||||
umask = taskdep['umask'][taskname]
|
||||
pass
|
||||
|
||||
dry_run = cfg.dry_run or dry_run_exec
|
||||
|
||||
|
||||
@@ -108,6 +108,10 @@ overview of their function and contents.
|
||||
command line option). The task name specified should not include the
|
||||
``do_`` prefix.
|
||||
|
||||
:term:`BB_DEFAULT_UMASK`
|
||||
The default umask to apply to tasks if specified and no task specific
|
||||
umask flag is set.
|
||||
|
||||
:term:`BB_DISKMON_DIRS`
|
||||
Monitors disk space and available inodes during the build and allows
|
||||
you to control the build based on these parameters.
|
||||
|
||||
@@ -1271,6 +1271,7 @@ class RunQueue:
|
||||
"date" : self.cfgData.getVar("DATE"),
|
||||
"time" : self.cfgData.getVar("TIME"),
|
||||
"hashservaddr" : self.cooker.hashservaddr,
|
||||
"umask" : self.cfgData.getVar("BB_DEFAULT_UMASK"),
|
||||
}
|
||||
|
||||
worker.stdin.write(b"<cookerconfig>" + pickle.dumps(self.cooker.configuration) + b"</cookerconfig>")
|
||||
|
||||
Reference in New Issue
Block a user