diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-06-12 16:46:37 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-06-16 17:57:29 +0100 |
commit | d5d35a27b4c46dbdb58ffc42dbdbbce21e433f81 (patch) | |
tree | c272fbec3aa7d3b051c81a5ab0e4b225f39f6d5f /meta/lib/oe/utils.py | |
parent | c5d7c7a23056dc67c4f6c6851169662a9696c5d3 (diff) | |
download | poky-d5d35a27b4c46dbdb58ffc42dbdbbce21e433f81.tar.gz |
lib/oe: Move vardepexclude entries alongside functions
Now we have decorators that can do this, move the variable dependencies
exclusions alongside the code that needs them for maintainability.
(From OE-Core rev: e522169c5f95de6fc74b43672573700d8eb8e082)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/utils.py')
-rw-r--r-- | meta/lib/oe/utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py index d272dd2b8d..a11db5f3cd 100644 --- a/meta/lib/oe/utils.py +++ b/meta/lib/oe/utils.py | |||
@@ -9,6 +9,8 @@ import multiprocessing | |||
9 | import traceback | 9 | import traceback |
10 | import errno | 10 | import errno |
11 | 11 | ||
12 | import bb.parse | ||
13 | |||
12 | def read_file(filename): | 14 | def read_file(filename): |
13 | try: | 15 | try: |
14 | f = open( filename, "r" ) | 16 | f = open( filename, "r" ) |
@@ -265,6 +267,7 @@ def execute_pre_post_process(d, cmds): | |||
265 | bb.note("Executing %s ..." % cmd) | 267 | bb.note("Executing %s ..." % cmd) |
266 | bb.build.exec_func(cmd, d) | 268 | bb.build.exec_func(cmd, d) |
267 | 269 | ||
270 | @bb.parse.vardepsexclude("BB_NUMBER_THREADS") | ||
268 | def get_bb_number_threads(d): | 271 | def get_bb_number_threads(d): |
269 | return int(d.getVar("BB_NUMBER_THREADS") or os.cpu_count() or 1) | 272 | return int(d.getVar("BB_NUMBER_THREADS") or os.cpu_count() or 1) |
270 | 273 | ||
@@ -467,7 +470,7 @@ def host_gcc_version(d, taskcontextonly=False): | |||
467 | version = match.group(1) | 470 | version = match.group(1) |
468 | return "-%s" % version if version in ("4.8", "4.9") else "" | 471 | return "-%s" % version if version in ("4.8", "4.9") else "" |
469 | 472 | ||
470 | 473 | @bb.parse.vardepsexclude("DEFAULTTUNE_MULTILIB_ORIGINAL", "OVERRIDES") | |
471 | def get_multilib_datastore(variant, d): | 474 | def get_multilib_datastore(variant, d): |
472 | localdata = bb.data.createCopy(d) | 475 | localdata = bb.data.createCopy(d) |
473 | if variant: | 476 | if variant: |