summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/bitbake-worker
diff options
context:
space:
mode:
authorSava Jakovljev <sjakovljev@outlook.com>2024-03-18 14:52:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-03-22 16:26:45 +0000
commit0acdb81ca62f1523eae310fc87f4011b3e161288 (patch)
treed4d0dfdc91cfc5353263792e9251e8301f446cd9 /bitbake/bin/bitbake-worker
parent98d09d41fa153a1a017e03dcc8e161aa357e8025 (diff)
downloadpoky-0acdb81ca62f1523eae310fc87f4011b3e161288.tar.gz
bitbake: bitbake-worker: Fix bug where umask 0 was not being applied to a task
* In the current implementation, "umask" variable is initially set to None and overwritten with user-specified value. However, in the worker implementation, a faulty if clause would only check whether the variable contains a value that evaluates to True, and not whether the variable is defined, so the value of 0 would lead to umask not being changed. This bug makes it impossible to have a task set its umask to value 0, for any possible reason it may want to. Fix this bug by extending the condition checked in the worker implementation. (Bitbake rev: 19f9df6c750c592316a0fa18165b68636281fe3e) Signed-off-by: Sava Jakovljev <sjakovljev@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin/bitbake-worker')
-rwxr-xr-xbitbake/bin/bitbake-worker2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index eba9c562c7..04d7570140 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/bin/bitbake-worker
@@ -241,7 +241,7 @@ def fork_off_task(cfg, data, databuilder, workerdata, extraconfigdata, runtask):
241 newsi = os.open(os.devnull, os.O_RDWR) 241 newsi = os.open(os.devnull, os.O_RDWR)
242 os.dup2(newsi, sys.stdin.fileno()) 242 os.dup2(newsi, sys.stdin.fileno())
243 243
244 if umask: 244 if umask is not None:
245 os.umask(umask) 245 os.umask(umask)
246 246
247 try: 247 try: