mirror of
https://git.yoctoproject.org/poky
synced 2026-05-01 15:32:12 +02:00
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>
This commit is contained in:
@@ -182,11 +182,8 @@ def fork_off_task(cfg, data, databuilder, workerdata, extraconfigdata, runtask):
|
||||
elif workerdata["umask"]:
|
||||
umask = workerdata["umask"]
|
||||
if umask:
|
||||
# umask might come in as a number or text string..
|
||||
try:
|
||||
umask = int(umask, 8)
|
||||
except TypeError:
|
||||
pass
|
||||
# Convert to a python numeric value as it could be a string
|
||||
umask = bb.utils.to_filemode(umask)
|
||||
|
||||
dry_run = cfg.dry_run or runtask['dry_run']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user