lib/oe: Move vardepexclude entries alongside functions
PATCH 1/1 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.
Signed-off-by Richard Purdie <[email protected]>
--- meta/conf/bitbake.conf | 8 -------- meta/lib/oe/package.py | 3 +++ meta/lib/oe/packagedata.py | 3 +++ meta/lib/oe/path.py | 3 +++ meta/lib/oe/sstatesig.py | 2 ++ meta/lib/oe/utils.py | 5 ++++- 6 files changed, 15 insertions(+), 9 deletions(-)
meta/conf/bitbake.conf +0 -8
@@ -986,11 +986,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"
meta/lib/oe/package.py +3 -0
@@ -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) [email protected]("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) [email protected]("BB_NUMBER_THREADS") def read_debugsources_info(d): import json import bb.compress.zstd
meta/lib/oe/packagedata.py +3 -0
@@ -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 [email protected]("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))) [email protected]("BB_NUMBER_THREADS") def emit_pkgdata(pkgfiles, d): def process_postinst_on_target(pkg, mlprefix): pkgval = d.getVar('PKG:%s' % pkg)
meta/lib/oe/path.py +3 -0
@@ -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) [email protected]("TOPDIR") def format_display(path, metadata): """ Prepare a path for display to the user. """ rel = relative(metadata.getVar("TOPDIR"), path)
meta/lib/oe/sstatesig.py +2 -0
@@ -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) [email protected]("BBEXTENDCURR", "BBEXTENDVARIANT", "OVERRIDES", "PACKAGE_EXTRA_ARCHS") def find_sstate_manifest(taskdata, taskdata2, taskname, d, multilibcache): d2 = d variant = ''
meta/lib/oe/utils.py +4 -1
@@ -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) [email protected]("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 "" - [email protected]("DEFAULTTUNE_MULTILIB_ORIGINAL", "OVERRIDES") def get_multilib_datastore(variant, d): localdata = bb.data.createCopy(d) if variant: