From patchwork Mon Nov 30 15:26:54 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 106498 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.34827.1796052435128889501 for ; Mon, 30 Nov 2026 07:27:15 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=cED9uPie; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.41, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4bb6ba3b244so109227465e9.3 for ; Mon, 30 Nov 2026 07:27:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1796052433; x=1796657233; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=CMgSJJRaW216e3tF3ylgFf1J1audkktc7mO5+6j5ZbU=; b=cED9uPien8t97s7XfECXIA29IozYO59sRRiULnirBYLskodWtfKga20vEGHRTjs2Ys 0IFBNZmPZPk2PBW8mLTX2YWF30Fqi6h1xJWxD8jayO21kQyyZ5ifO4CGqzE1af6w1Lch CTMsFd2EJ6JE4ycZYL1e1RpgfeZ6NdQdsuLzo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796052433; x=1796657233; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=CMgSJJRaW216e3tF3ylgFf1J1audkktc7mO5+6j5ZbU=; b=dbnuLYjfU/q9M4+HkIrfuzTbvyRuOGbjZWcp3Cmel2oDb4L6LrWaWoD4k66RYge7Pt D32SaIyNXksbYWN3kHTuf2SryLlMqjK1QxwQhyMIruFnO62NZh06LaKy578fXYgF8TEi QKNtZUxcAMQdvHx6Fygr5hKOlaIzNZGbVn5AAR8zXvgD+C3qP/sR6u6Pgq38qwdTpiUe m84l9r6c2vHFvCzpt1r/8tpsEz7plfI3Oy0qjofSusH9EE10RzIf0kOEvk/6URa89eVl 1XCfJegaRhO0fJMAAv444EGtC2jjVsR5ZTu8cNBSHKuk2MnXj6HX3Ob8h4KdDLFJsraQ pNGA== X-Gm-Message-State: APuU4Z+X9xJh872wBBUZJQ+g0Byokp7gtvIkjQJH51w2VmrIzY4hB3Vt uUKQtrKXEQRZFDeq0BXeBE8G+GX3L2nHmkJyvv33SNeN86rUMQyVfX4KVQG+1cr8RrQJPhL7IH+ +udvfha4= X-Gm-Gg: AZFdTZdzCi/drxsf14fsU9P+B9FFpTqk8oZP32m9hSCD0JUk2uceCVOZdkJANKxaQbT J2NIglKKe4kyhjYev1m41/Hh0yV8VMnbalbEsZkPkMEtQwrRCCdCSA/p0e7dvzAFzFzMX7OozG7 UVvjFnghSnfgS3UMuZiRHyobc42/ykMTdDoZD2QXdA046KqIhvBrBXOqy+MSRYMJwyDtJZ//Txj f5KyC3vMKZUESY4mhjqxefl1KKw+2zopmtTeqbiu82F0EGU8dPdLPvcaPK1nVL7J3dyhe12GOiN p9RBXI9DcEFPNWt8fC/lwKX6abVpbLkNMn2UGPNQyE4Mrdzp7idU4YiLH2j0OSkfoNT8YifUgjq +XnL2Xesx+wpFGVYFoWXaz68cuVH+n1OKaK4Ila6hgkpg3UUMLgMA5eTLl5xLCmrX4vAmAJ2hRL gVcz3WrUHyn2Ya/CtEw144q3uJmJTKS5fVda+aA0aGeR1+gU2vGdXixgGT1771Y514OxLwBURku Ma54pHRHoM3l40oVgsct3iyVuyHSUG3fl+4+hoR6i9pTAAhUtYlbQYn/sbXdI0xByuT7sdnfEt9 MUHwpJTDl4Kc9f3DMpEAAH8wZ0CqwDAFEA58tuUdO/qiuwdW6BD1G35n3w== X-Received: by 2002:a05:600c:3547:b0:4a2:a6e:80f5 with SMTP id 5b1f17b1804b1-4bb888098bfmr690290885e9.11.1796052432748; Mon, 30 Nov 2026 07:27:12 -0800 (PST) Return-Path: Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:2444:81bb:2aff:8d84]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb8538b09bsm1704014155e9.4.2026.11.30.07.27.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 07:27:11 -0800 (PST) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 06/16] core: Migrate to new layer format Date: Mon, 30 Nov 2026 15:26:54 +0000 Message-ID: <20261130152704.3471590-6-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261130152704.3471590-1-richard.purdie@linuxfoundation.org> References: <20261130152704.3471590-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Mon, 30 Nov 2026 15:27:19 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251615 After bitbake "cooker: Change layer.conf handling to new approach", we need to update our layer.conf files to the new format. To quote that change: This is a fairly radical set of changes to the way layer.conf is handled and how it works with layers. I tried to split this into more specific changes but bascially I couldn't make that work in any reasonable way. It is not intended to be backward compatible even if some bits of syntax are similar. There were several historical issues: - layers can contain multiple 'collections' - priorities could depend on the file, collection and layer which interacted in ways people couldn't easily picture - layer.conf became a dumping ground for random variables - the current internal layer/collection 'names' are suboptimal This patch therefore: - Drops the concept of 'collections' - Drops layer priorities - Drops file priorities - Requires LAYERNAME to be set - Auto constructs BBPATH based on layer dependencies - AUto constructs BBFILES based on layer dependencies - Auto constructs BBFILES_DYNAMIC based on a "dynamic-recipes" directory - Filter layer.conf variables - Adds support for layer specific variables in layervars.conf - Sets LAYERDIR_ variables (and includes bitbake) - No longer supports layers within layers (multiple layers in a repo is still fine) More details notes follow (with examples from OE): """ layer.conf has radically changed and is now parsed in isolation on top of bblayers.conf. This means any changes made to variables in that file don't pass to other files or the global state by default. ":append" would only add to the value from bblayers. Overrides will not work as they're not defined at this point. layer.conf is now expected to set a LAYERNAME. The layer names are going to change. Some examples: "core" -> "oe-core" "openembedded-layer" -> "meta-oe" "networking-layer" -> meta-oe-networking" "virtualization-layer" -> "meta-virtualization" The idea is to have a consistent base prefix for combined repos so that the repo can be identified from the name (e.g. in a list of dependencies), and drop unneeded "-layer" suffix, make "core" clearer from other "core" things. As such, we are expecting layers to move to new names. Note that any fragment references also then need to use the new layer names. The LAYERDEPENDS and LAYERRECOMMENDS variables remain as before. LAYER* variables which traditionally had a collection name suffix, e.g. "_core" now don't need to be suffixed with the layername, but can be. The concepts of layer priorities, bbfile prorities and collections are all removed. This means the variables BFILE_COLLECTIONS, BBFILE_PRIORITY and BBFILE_PATTERN no longer do anything but trigger warnings. BBPATH and BBFILES no longer should be set by layer.conf. They are both now set based upon the information from LAYERDEPENDS. If you depend on a layer, you have the ability to change it. BBFILES will now just include .bb and .bbappend files in any recipes* directories. BBFILES_DYNAMIC is also no longer needed. Instead, bitbake will look for a "dynamic-recipes" directory and apply any subdirectories directories there based on layername, adding any files contained to BBFILES internally dynamically. Bitbake will set LAYERDIR_ in the global namespace. In addition, it will also set BITBAKEDIR to point at itself (OE-Core needs that, hopefully nothing else does and it is really for internal use to build PATH correctly). BBLAYERS no longer controls much other that the layers to include. There are two variables which are exceptions, LAYERSERIES_CORENAMES and LAYER_PASSTHROUGH_VARS_PREFIXES. These two are only set by the first layer included that sets them. For the layerseries, this is by historical precedent, I did this for the latter for now to potentially cover some weird use cases people may have. I am tempted to remove that special casing and only allow one layer to set those variables. There are some variables which can pass from layer.conf into the global scope. There is a list of variable prefixes which are accepted in LAYER_PASSTHROUGH_VARS_PREFIXES. These should be lists which work well with +=. This list is deliberately restrictive, I've worked with the sample layers to remove as many of them that I can. Layers do need some way of setting variables for their own recipes. This is done with a new layervars.conf, which recipes in a given layer will always have included (in .bb files but not .bbappend). Note that layervars.conf is parsed on top of the base configuration, so much later in parsing than layer.conf. One pattern we've noticed is layers wanting to warn that the configuration they provide is not enabled and to provide that config, usually as a DISTRO_FEATURE. I've changed meta-virtiualization to use fragments to enable the different configs (which can enable DISTRO_FEATURES in turn). That means we can add a LAYER_FRAGEMENTS_RECOMMEND_ANY variable which is used to warn when fragments aren't selected and the user can override with LAYER_FRAGEMENTS_OPTED_OUT to hide the warnings if they really don't want to select any. Some things are better imeplemented with conf files and a "include_all" directive in core. I've changed security flags and reproducible builds to do that, we should be doing this anyway. Some layers have been setting INHERIT in layer.conf. This is no longer supported and should be done by configuration files/fragments instead. It can be done in layervars.conf but will only apply to recipes in that layer (and not bbapends). There is a BB_LAYER_FILTER_FUNC variable which takes the name of function which can make final changes to the datastore at the end of "layer" parsing before the main parse. If your layer is intended to be shared at all and used by others outside your own context, you *should not* be using this. It can only be set once, by the first layer.conf found that sets it. From an internals perspective, there is now a Layers object stored in the datastore as "layerdata". This is useful for some areas of the code to be able to work with layers, such as the fragment code. It is considered semi-internal API at this point. It does mean anyone iterating datastore values needs to be careful about non-text return values but we already have those. """ Signed-off-by: Richard Purdie --- meta-selftest/conf/layer.conf | 14 ++----- meta-skeleton/conf/layer.conf | 21 ++-------- meta/classes-recipe/testexport.bbclass | 6 +-- meta/classes-recipe/toolchain-scripts.bbclass | 2 +- meta/conf/bitbake.conf | 11 +++--- meta/conf/layer.conf | 39 ++++++++++--------- meta/conf/templates/default/local.conf.sample | 2 +- meta/lib/oeqa/selftest/cases/bblayers.py | 8 ++-- scripts/lib/devtool/ide_sdk.py | 4 +- 9 files changed, 44 insertions(+), 63 deletions(-) diff --git a/meta-selftest/conf/layer.conf b/meta-selftest/conf/layer.conf index 40b6b6910ad..2aa8b9b3dca 100644 --- a/meta-selftest/conf/layer.conf +++ b/meta-selftest/conf/layer.conf @@ -1,16 +1,8 @@ -# We have a conf and classes directory, add to BBPATH -BBPATH .= ":${LAYERDIR}" -# We have recipes-* directories, add to BBFILES -BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ - ${LAYERDIR}/recipes-*/*/*.bbappend" - -BBFILE_COLLECTIONS += "selftest" -BBFILE_PATTERN_selftest = "^${LAYERDIR}/" -BBFILE_PRIORITY_selftest = "5" +LAYERNAME = "selftest" addpylib ${LAYERDIR}/lib oeqa -LAYERSERIES_COMPAT_selftest = "blacksail" +LAYERSERIES_COMPAT_selftest = "garburn" -OE_FRAGMENTS_BUILTIN:append = " selftest-fragment:SELFTEST_BUILTIN_FRAGMENT_VARIABLE" +OE_FRAGMENTS_BUILTIN += " selftest-fragment:SELFTEST_BUILTIN_FRAGMENT_VARIABLE" diff --git a/meta-skeleton/conf/layer.conf b/meta-skeleton/conf/layer.conf index 94909d51205..fdb2f01c27c 100644 --- a/meta-skeleton/conf/layer.conf +++ b/meta-skeleton/conf/layer.conf @@ -1,17 +1,4 @@ -# We have a conf and classes directory, add to BBPATH -BBPATH .= ":${LAYERDIR}" - -# We have recipes-* directories, add to BBFILES -BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend" - -BBFILE_COLLECTIONS += "skeleton" -BBFILE_PATTERN_skeleton = "^${LAYERDIR}/" -BBFILE_PRIORITY_skeleton = "1" - -# This should only be incremented on significant changes that will -# cause compatibility issues with other layers -LAYERVERSION_skeleton = "1" - -LAYERDEPENDS_skeleton = "core" - -LAYERSERIES_COMPAT_skeleton = "blacksail" +LAYERNAME = "skeleton" +LAYERVERSION = "1" +LAYERDEPENDS = "oe-core" +LAYERSERIES_COMPAT = "garburn" diff --git a/meta/classes-recipe/testexport.bbclass b/meta/classes-recipe/testexport.bbclass index b2b4a358c43..655f4267244 100644 --- a/meta/classes-recipe/testexport.bbclass +++ b/meta/classes-recipe/testexport.bbclass @@ -85,7 +85,7 @@ def copy_needed_files(d, tc): from oeqa.core.utils.test import getSuiteCasesFiles export_path = d.getVar('TEST_EXPORT_DIR') - bitbake_path = d.getVar('BITBAKEPATH') + bitbake_path = d.getVar('BITBAKEDIR') corebase_path = d.getVar('COREBASE') bblayers = d.getVar('BBLAYERS').split() @@ -93,10 +93,10 @@ def copy_needed_files(d, tc): oe.path.remove(export_path) bb.utils.mkdirhier(os.path.join(export_path, 'lib', 'oeqa')) - # The source of files to copy are relative to 'BITBAKEPATH' and 'COREBASE' + # The source of files to copy are relative to 'BITBAKEDIR' and 'COREBASE' # directory. The destination is relative to 'TEST_EXPORT_DIR'. # bitbake and core files/dirs first. - bitbake_files_to_copy = [os.path.join('..', 'lib')] + bitbake_files_to_copy = ['lib'] for f in bitbake_files_to_copy: src = os.path.join(bitbake_path, f) dst = os.path.join(export_path, 'bitbake', f.split('/', 1)[-1]) diff --git a/meta/classes-recipe/toolchain-scripts.bbclass b/meta/classes-recipe/toolchain-scripts.bbclass index 7b10b76609e..7bb77a5a7c4 100644 --- a/meta/classes-recipe/toolchain-scripts.bbclass +++ b/meta/classes-recipe/toolchain-scripts.bbclass @@ -89,7 +89,7 @@ toolchain_create_sdk_env_script () { # Caller must ensure CONFIG_SITE is setup toolchain_create_tree_env_script () { script=${B}/environment-setup-${REAL_MULTIMACH_TARGET_SYS} - bitbakedir=$(readlink -f ${BITBAKEPATH}/..) + bitbakedir=$(readlink -f ${BITBAKEDIR}) rm -f $script touch $script echo 'standalone_sysroot_target="${STAGING_DIR}/${MACHINE}"' >> $script diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 8ff14158d9a..4a28b619c12 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -1,3 +1,5 @@ +COREBASE := "${@os.path.realpath('${LAYERDIR_oe-core}/../')}" + ################################################################## # Standard target filesystem paths. ################################################################## @@ -515,8 +517,7 @@ EXTRA_IMAGEDEPENDS = "" # Toolchain info. ################################################################## -PATH:prepend = "${COREBASE}/scripts:${STAGING_BINDIR_TOOLCHAIN}:${STAGING_BINDIR_CROSS}:${STAGING_DIR_NATIVE}${sbindir_native}:${STAGING_BINDIR_NATIVE}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}${base_bindir_native}:" -export PATH +export PATH = "${COREBASE}/scripts:${STAGING_BINDIR_TOOLCHAIN}:${STAGING_BINDIR_CROSS}:${STAGING_DIR_NATIVE}${sbindir_native}:${STAGING_BINDIR_NATIVE}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}${base_bindir_native}:${BITBAKEDIR}/bin:${RECIPE_HOSTTOOLS_DIR}:${HOSTTOOLS_DIR}" ################################################################## # Build utility info. @@ -803,7 +804,7 @@ include conf/local.conf OE_FRAGMENTS_PREFIX ?= "conf/fragments" OE_FRAGMENTS_METADATA_VARS ?= "BB_CONF_FRAGMENT_SUMMARY BB_CONF_FRAGMENT_DESCRIPTION" -OE_FRAGMENTS_BUILTIN ?= "machine:MACHINE distro:DISTRO" +OE_FRAGMENTS_BUILTIN =+ "machine:MACHINE distro:DISTRO" addfragments ${OE_FRAGMENTS_PREFIX} OE_FRAGMENTS OE_FRAGMENTS_METADATA_VARS OE_FRAGMENTS_BUILTIN require ${@"conf/multiconfig/${BB_CURRENT_MC}.conf" if "${BB_CURRENT_MC}" != "" else ""} @@ -902,8 +903,8 @@ DISTRO_FEATURES_NATIVESDK:mingw32 = "x11 ipv6" # Normally target distro features will not be applied to native builds: # Native distro features on this list will use the target feature value -DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod opengl wayland" -DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod opengl wayland" +DISTRO_FEATURES_FILTER_NATIVE += "api-documentation debuginfod opengl wayland" +DISTRO_FEATURES_FILTER_NATIVESDK += "api-documentation debuginfod opengl wayland" MACHINE_FEATURES_DEFAULTS = "rtc qemu-usermode" diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf index 04bceadddee..53f77d165c2 100644 --- a/meta/conf/layer.conf +++ b/meta/conf/layer.conf @@ -1,23 +1,29 @@ -# We have a conf and classes directory, add to BBPATH -BBPATH .= ":${LAYERDIR}" -# We have recipes-* directories, add to BBFILES -BBFILES += "${LAYERDIR}/recipes-*/*/*.bb" +LAYERNAME = "oe-core" -BBFILE_COLLECTIONS += "core" -BBFILE_PATTERN_core = "^${LAYERDIR}/" -BBFILE_PRIORITY_core = "5" - -LAYERSERIES_CORENAMES = "blacksail" +LAYERSERIES_CORENAMES = "garburn" # This should only be incremented on significant changes that will # cause compatibility issues with other layers -LAYERVERSION_core = "15" -LAYERSERIES_COMPAT_core = "blacksail" +LAYERVERSION = "15" +LAYERSERIES_COMPAT = "garburn" -BBLAYERS_LAYERINDEX_NAME_core = "openembedded-core" +LAYER_PASSTHROUGH_VARS_PREFIXES = " \ + BBMASK \ + PREFERRED_RPROVIDER \ + PREFERRED_PROVIDER \ + OE_FRAGMENTS_BUILTIN \ + NON_MULTILIB_RECIPES \ + IMAGE_CLASSES \ + SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS \ + SIGGEN_EXCLUDERECIPES_ABISAFE \ + SSTATE_EXCLUDEDEPS_SYSROOT \ + DUMMY_PACKAGE_ARCHS_TARGET \ + DUMMY_PACKAGE_ARCHS_SDK \ + DISTRO_FEATURES_FILTER_NATIVE \ + DISTRO_FEATURES_FILTER_NATIVESDK \ +" -# Set a variable to get to the top of the metadata location -COREBASE = '${@os.path.normpath("${LAYERDIR}/../")}' +BBLAYERS_LAYERINDEX_NAME_oe-core = "openembedded-core" # opkg-utils is for update-alternatives :( SIGGEN_EXCLUDERECIPES_ABISAFE += " \ @@ -135,11 +141,6 @@ SSTATE_EXCLUDEDEPS_SYSROOT += ".*->autoconf-archive-native" DUMMY_PACKAGE_ARCHS_SDK += "buildtools-dummy-${SDKPKGSUFFIX} sdk-provides-dummy-${SDKPKGSUFFIX}" DUMMY_PACKAGE_ARCHS_TARGET += "sdk-provides-dummy-target" -# We need to keep bitbake tools in PATH -# Avoid empty path entries -BITBAKEPATH := "${@os.path.dirname(bb.utils.which(d.getVar('PATH'),'bitbake'))}" -PATH := "${@'${BITBAKEPATH}:' if '${BITBAKEPATH}' != '' else ''}${RECIPE_HOSTTOOLS_DIR}:${HOSTTOOLS_DIR}" - # Only OE-Core should set/change this BB_GLOBAL_PYMODULES = "os sys time" diff --git a/meta/conf/templates/default/local.conf.sample b/meta/conf/templates/default/local.conf.sample index 935699929c3..a4178edff11 100644 --- a/meta/conf/templates/default/local.conf.sample +++ b/meta/conf/templates/default/local.conf.sample @@ -213,7 +213,7 @@ BB_DISKMON_DIRS ??= "\ # will then speed up the builds by not having to build things if they are present in the # cache. It assumes you can download something faster than you can build it which will # depend on your network. -# OE_FRAGMENTS += "core/yocto/sstate-mirror-cdn" +# OE_FRAGMENTS += "oe-core/yocto/sstate-mirror-cdn" # # Qemu configuration diff --git a/meta/lib/oeqa/selftest/cases/bblayers.py b/meta/lib/oeqa/selftest/cases/bblayers.py index 849afe36718..7ca82e0d5c0 100644 --- a/meta/lib/oeqa/selftest/cases/bblayers.py +++ b/meta/lib/oeqa/selftest/cases/bblayers.py @@ -21,9 +21,9 @@ class BitbakeLayers(OESelftestTestCase): bitbake("-c addto_recipe_sysroot python3-jsonschema-native") # Fetch variables used in multiple test cases - bb_vars = get_bb_vars(['COREBASE', 'BITBAKEPATH']) + bb_vars = get_bb_vars(['COREBASE', 'BITBAKEDIR']) cls.corebase = bb_vars['COREBASE'] - cls.bitbakepath = bb_vars['BITBAKEPATH'] + cls.bitbakedir = bb_vars['BITBAKEDIR'] cls.jsonschema_staging_bindir = get_bb_var('STAGING_BINDIR', 'python3-jsonschema-native') def test_bitbakelayers_layerindexshowdepends(self): @@ -145,7 +145,7 @@ class BitbakeLayers(OESelftestTestCase): def validate_json(self, json, jsonschema): python = os.path.join(self.jsonschema_staging_bindir, 'nativepython3') jsonvalidator = os.path.join(self.jsonschema_staging_bindir, 'jsonschema') - schemas_dir = os.path.join(self.bitbakepath, "..", "setup-schema") + schemas_dir = os.path.join(self.bitbakedir, "setup-schema") if not os.path.isabs(jsonschema): jsonschema = os.path.join(schemas_dir, jsonschema) @@ -165,7 +165,7 @@ class BitbakeLayers(OESelftestTestCase): def test_validate_bitbake_setup_default_registry(self): jsonschema = "bitbake-setup.schema.json" - default_registry_path = os.path.join(self.bitbakepath, "..", "default-registry", "configurations") + default_registry_path = os.path.join(self.bitbakedir, "default-registry", "configurations") for root, _, files in os.walk(default_registry_path): for f in files: diff --git a/scripts/lib/devtool/ide_sdk.py b/scripts/lib/devtool/ide_sdk.py index 9faf041957e..5dc5199c24b 100755 --- a/scripts/lib/devtool/ide_sdk.py +++ b/scripts/lib/devtool/ide_sdk.py @@ -974,7 +974,7 @@ class RecipeModified: self.base_libdir = recipe_d.getVar('base_libdir') self.bblayers = recipe_d.getVar('BBLAYERS').split() self.bindir = recipe_d.getVar('bindir') - self.bitbakepath = recipe_d.getVar('BITBAKEPATH') + self.bitbakepath = recipe_d.getVar('BITBAKEDIR') self.bpn = recipe_d.getVar('BPN') self.cc = recipe_d.getVar('CC') self.cxx = recipe_d.getVar('CXX') @@ -1656,7 +1656,7 @@ class RecipeModified: cmd_lines += ['import os', 'import sys', 'sys.path.insert(0, %r)' % os.path.realpath( - os.path.join(self.bitbakepath, '..', 'lib')), + os.path.join(self.bitbakepath, 'lib')), 'import bb.tinfoil', 'os.chdir(%r)' % self.topdir, # A stale BBPATH from the caller's environment (e.g. a