]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
lib/oe: Move vardepexclude entries alongside functions
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 12 Jun 2025 15:46:37 +0000 (16:46 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Jun 2025 16:56:27 +0000 (17:56 +0100)
Now we have decorators that can do this, move the variable dependencies
exclusions alongside the code that needs them for maintainability.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/bitbake.conf
meta/lib/oe/package.py
meta/lib/oe/packagedata.py
meta/lib/oe/path.py
meta/lib/oe/sstatesig.py
meta/lib/oe/utils.py

index e600d9d774a0b7ffb10af36993a5d72353ac5465..8686c0a25f3c9d8d110c5a6a643bbb522b64a1e5 100644 (file)
@@ -987,11 +987,3 @@ MULTILIB_VARIANTS ??= ""
 # support unihashes.
 BB_UNIHASH ?= "${BB_TASKHASH}"
 
-oe.sstatesig.find_sstate_manifest[vardepsexclude] = "BBEXTENDCURR BBEXTENDVARIANT OVERRIDES PACKAGE_EXTRA_ARCHS"
-oe.utils.get_multilib_datastore[vardepsexclude] = "DEFAULTTUNE_MULTILIB_ORIGINAL OVERRIDES"
-oe.path.format_display[vardepsexclude] = "TOPDIR"
-oe.utils.get_bb_number_threads[vardepsexclude] = "BB_NUMBER_THREADS"
-oe.package.save_debugsources_info[vardepsexclude] = "BB_NUMBER_THREADS"
-oe.package.read_debugsources_info[vardepsexclude] = "BB_NUMBER_THREADS"
-oe.packagedata.emit_pkgdata[vardepsexclude] = "BB_NUMBER_THREADS"
-oe.packagedata.read_subpkgdata_extended[vardepsexclude] = "BB_NUMBER_THREADS"
index 60392cbcedb1297022401c83f49c82c8add0728a..ce69151e5d35f665f374df8435ccc3ecb844c993 100644 (file)
@@ -16,6 +16,7 @@ import mmap
 import subprocess
 import shutil
 
+import bb.parse
 import oe.cachedpath
 
 def runstrip(file, elftype, strip, extra_strip_sections=''):
@@ -1049,6 +1050,7 @@ def copydebugsources(debugsrcdir, sources, d):
             if os.path.exists(p) and not os.listdir(p):
                 os.rmdir(p)
 
+@bb.parse.vardepsexclude("BB_NUMBER_THREADS")
 def save_debugsources_info(debugsrcdir, sources_raw, d):
     import json
     import bb.compress.zstd
@@ -1081,6 +1083,7 @@ def save_debugsources_info(debugsrcdir, sources_raw, d):
         with bb.compress.zstd.open(debugsources_file, "wt", encoding="utf-8", num_threads=num_threads) as f:
             json.dump(sources_dict, f, sort_keys=True)
 
+@bb.parse.vardepsexclude("BB_NUMBER_THREADS")
 def read_debugsources_info(d):
     import json
     import bb.compress.zstd
index 2d1d6ddeb75e89c53bfcee552ba4fb75c702cc2a..b6a10a930a518277cca49553f40979688307d175 100644 (file)
@@ -7,6 +7,7 @@
 import codecs
 import os
 import json
+import bb.parse
 import bb.compress.zstd
 import oe.path
 
@@ -64,6 +65,7 @@ def read_subpkgdata_dict(pkg, d):
         ret[newvar] = subd[var]
     return ret
 
+@bb.parse.vardepsexclude("BB_NUMBER_THREADS")
 def read_subpkgdata_extended(pkg, d):
     import json
     import bb.compress.zstd
@@ -182,6 +184,7 @@ def runtime_mapping_rename(varname, pkg, d):
 
     #bb.note("%s after: %s" % (varname, d.getVar(varname)))
 
+@bb.parse.vardepsexclude("BB_NUMBER_THREADS")
 def emit_pkgdata(pkgfiles, d):
     def process_postinst_on_target(pkg, mlprefix):
         pkgval = d.getVar('PKG:%s' % pkg)
index 5d21cdcbdff169d8b325a786e3d3ad14d3f16c9f..a1efe97d881e0d0e9cf74229a9041e567d71a67b 100644 (file)
@@ -10,6 +10,8 @@ import shutil
 import subprocess
 import os.path
 
+import bb.parse
+
 def join(*paths):
     """Like os.path.join but doesn't treat absolute RHS specially"""
     return os.path.normpath("/".join(paths))
@@ -77,6 +79,7 @@ def replace_absolute_symlinks(basedir, d):
             os.remove(path)
             os.symlink(base, path)
 
+@bb.parse.vardepsexclude("TOPDIR")
 def format_display(path, metadata):
     """ Prepare a path for display to the user. """
     rel = relative(metadata.getVar("TOPDIR"), path)
index 826549948e24571ef57acbe6bc5a2442d6c49f13..ef687f5d417c14ce1fbb30e47125d1511ec60529 100644 (file)
@@ -3,6 +3,7 @@
 #
 # SPDX-License-Identifier: GPL-2.0-only
 #
+import bb.parse
 import bb.siggen
 import bb.runqueue
 import oe
@@ -493,6 +494,7 @@ def sstate_get_manifest_filename(task, d):
         d2.setVar("SSTATE_MANMACH", extrainf)
     return (d2.expand("${SSTATE_MANFILEPREFIX}.%s" % task), d2)
 
+@bb.parse.vardepsexclude("BBEXTENDCURR", "BBEXTENDVARIANT", "OVERRIDES", "PACKAGE_EXTRA_ARCHS")
 def find_sstate_manifest(taskdata, taskdata2, taskname, d, multilibcache):
     d2 = d
     variant = ''
index d272dd2b8dab3f4725f0f90a79a24f745c5ca474..a11db5f3cd97dd85218694bebf5ab998b3fe1676 100644 (file)
@@ -9,6 +9,8 @@ import multiprocessing
 import traceback
 import errno
 
+import bb.parse
+
 def read_file(filename):
     try:
         f = open( filename, "r" )
@@ -265,6 +267,7 @@ def execute_pre_post_process(d, cmds):
         bb.note("Executing %s ..." % cmd)
         bb.build.exec_func(cmd, d)
 
+@bb.parse.vardepsexclude("BB_NUMBER_THREADS")
 def get_bb_number_threads(d):
     return int(d.getVar("BB_NUMBER_THREADS") or os.cpu_count() or 1)
 
@@ -467,7 +470,7 @@ def host_gcc_version(d, taskcontextonly=False):
     version = match.group(1)
     return "-%s" % version if version in ("4.8", "4.9") else ""
 
-
+@bb.parse.vardepsexclude("DEFAULTTUNE_MULTILIB_ORIGINAL", "OVERRIDES")
 def get_multilib_datastore(variant, d):
     localdata = bb.data.createCopy(d)
     if variant: