summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-06-27 10:12:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-07-01 08:49:37 +0100
commit58b0a65ada340fda3bc04fa9fcb648eb43246402 (patch)
tree982cfef481827b0f46d5bc753730604bb71323d8 /bitbake/bin
parentc02b7accd54ea657da9d771814b3dc92d0591127 (diff)
downloadpoky-58b0a65ada340fda3bc04fa9fcb648eb43246402.tar.gz
bitbake: utils: Refactor filemode variable conversion to a function
We have other places in the code where we need to take filemode/mask information from a bitbake variable and turn it into a real python number. Turn this internal code into public API in bb.utils and add some tests for it. (Bitbake rev: d89e30fb2fb15b09f2cb95c4e5aa9f749ca257ea) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/bitbake-worker7
1 files changed, 2 insertions, 5 deletions
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index 35fa1ab62b..d2b146a6a9 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/bin/bitbake-worker
@@ -182,11 +182,8 @@ def fork_off_task(cfg, data, databuilder, workerdata, extraconfigdata, runtask):
182 elif workerdata["umask"]: 182 elif workerdata["umask"]:
183 umask = workerdata["umask"] 183 umask = workerdata["umask"]
184 if umask: 184 if umask:
185 # umask might come in as a number or text string.. 185 # Convert to a python numeric value as it could be a string
186 try: 186 umask = bb.utils.to_filemode(umask)
187 umask = int(umask, 8)
188 except TypeError:
189 pass
190 187
191 dry_run = cfg.dry_run or runtask['dry_run'] 188 dry_run = cfg.dry_run or runtask['dry_run']
192 189