diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-07 09:00:25 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-07 10:20:32 +0000 |
| commit | 2aeb91cdb370197dfbb7b14afb0bdd96538c9dc1 (patch) | |
| tree | 68a8f63e2ca477645283e6c34d0567a39d61fbfc /bitbake | |
| parent | 516039e60916da4c3bb39f0d0c18d721e7ecf75e (diff) | |
| download | poky-2aeb91cdb370197dfbb7b14afb0bdd96538c9dc1.tar.gz | |
bitbake: bitbake-setup: Rename bb-layers-relative to bb-layers-file-relative
The difference between bb-layers and bb-layers-relative is unclear as both
are relative paths. Rename one to "file-relative" which makes it clear it
is relative to the current file, without becomming a long name.
https://lists.openembedded.org/g/bitbake-devel/message/18296
Based on a patch from Alexander Kanavin <alex@linutronix.de> but
with different naming.
(Bitbake rev: dcb17758b99767ab6da4172cf60eabc9269082dd)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
| -rwxr-xr-x | bitbake/bin/bitbake-setup | 10 | ||||
| -rw-r--r-- | bitbake/lib/bb/tests/setup.py | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/bitbake/bin/bitbake-setup b/bitbake/bin/bitbake-setup index 29fdf11892..caec990c29 100755 --- a/bitbake/bin/bitbake-setup +++ b/bitbake/bin/bitbake-setup | |||
| @@ -129,7 +129,7 @@ def checkout_layers(layers, layerdir, d): | |||
| 129 | return layers_fixed_revisions | 129 | return layers_fixed_revisions |
| 130 | 130 | ||
| 131 | def setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir): | 131 | def setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir): |
| 132 | def _setup_build_conf(layers, relative_layers, build_conf_dir): | 132 | def _setup_build_conf(layers, filerelative_layers, build_conf_dir): |
| 133 | os.makedirs(build_conf_dir) | 133 | os.makedirs(build_conf_dir) |
| 134 | layers_s = [] | 134 | layers_s = [] |
| 135 | 135 | ||
| @@ -137,11 +137,11 @@ def setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir): | |||
| 137 | l = os.path.join(layerdir, l) | 137 | l = os.path.join(layerdir, l) |
| 138 | layers_s.append(" {} \\".format(l)) | 138 | layers_s.append(" {} \\".format(l)) |
| 139 | 139 | ||
| 140 | for l in relative_layers: | 140 | for l in filerelative_layers: |
| 141 | if thisdir: | 141 | if thisdir: |
| 142 | l = os.path.join(thisdir, l) | 142 | l = os.path.join(thisdir, l) |
| 143 | else: | 143 | else: |
| 144 | raise Exception("Configuration is using bb-layers-relative to specify " \ | 144 | raise Exception("Configuration is using bb-layers-file-relative to specify " \ |
| 145 | "a layer path relative to itself. This can be done only " \ | 145 | "a layer path relative to itself. This can be done only " \ |
| 146 | "when the configuration is specified by its path on local " \ | 146 | "when the configuration is specified by its path on local " \ |
| 147 | "disk, not when it's in a registry or is fetched over http.") | 147 | "disk, not when it's in a registry or is fetched over http.") |
| @@ -223,8 +223,8 @@ def setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir): | |||
| 223 | os.rename(bitbake_confdir, backup_bitbake_confdir) | 223 | os.rename(bitbake_confdir, backup_bitbake_confdir) |
| 224 | 224 | ||
| 225 | if layers: | 225 | if layers: |
| 226 | relative_layers = bitbake_config.get("bb-layers-relative") or [] | 226 | filerelative_layers = bitbake_config.get("bb-layers-file-relative") or [] |
| 227 | _setup_build_conf(layers, relative_layers, bitbake_confdir) | 227 | _setup_build_conf(layers, filerelative_layers, bitbake_confdir) |
| 228 | 228 | ||
| 229 | if template: | 229 | if template: |
| 230 | bb.process.run("{} setup -c {} -b {} --no-shell".format(oesetupbuild, template, bitbake_builddir)) | 230 | bb.process.run("{} setup -c {} -b {} --no-shell".format(oesetupbuild, template, bitbake_builddir)) |
diff --git a/bitbake/lib/bb/tests/setup.py b/bitbake/lib/bb/tests/setup.py index ba2a90009d..6e9bf03654 100644 --- a/bitbake/lib/bb/tests/setup.py +++ b/bitbake/lib/bb/tests/setup.py | |||
| @@ -148,10 +148,10 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) | |||
| 148 | "oe-fragments": ["test-fragment-2"] | 148 | "oe-fragments": ["test-fragment-2"] |
| 149 | }, | 149 | }, |
| 150 | { | 150 | { |
| 151 | "name": "gizmo-notemplate-with-relative-layers", | 151 | "name": "gizmo-notemplate-with-filerelative-layers", |
| 152 | "description": "Gizmo notemplate configuration using relative layers", | 152 | "description": "Gizmo notemplate configuration using filerelative layers", |
| 153 | "bb-layers": ["layerC","layerD/meta-layer"], | 153 | "bb-layers": ["layerC","layerD/meta-layer"], |
| 154 | "bb-layers-relative": ["layerE/meta-layer"], | 154 | "bb-layers-file-relative": ["layerE/meta-layer"], |
| 155 | "oe-fragments": ["test-fragment-2"] | 155 | "oe-fragments": ["test-fragment-2"] |
| 156 | } | 156 | } |
| 157 | ] | 157 | ] |
| @@ -206,12 +206,12 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) | |||
| 206 | bblayers = f.read() | 206 | bblayers = f.read() |
| 207 | for l in bitbake_config["bb-layers"]: | 207 | for l in bitbake_config["bb-layers"]: |
| 208 | self.assertIn(os.path.join(setuppath, "layers", l), bblayers) | 208 | self.assertIn(os.path.join(setuppath, "layers", l), bblayers) |
| 209 | for l in bitbake_config.get("bb-layers-relative") or []: | 209 | for l in bitbake_config.get("bb-layers-file-relative") or []: |
| 210 | relative_layer = os.path.join( | 210 | filerelative_layer = os.path.join( |
| 211 | os.path.dirname(config_upstream["path"]), | 211 | os.path.dirname(config_upstream["path"]), |
| 212 | l, | 212 | l, |
| 213 | ) | 213 | ) |
| 214 | self.assertIn(relative_layer, bblayers) | 214 | self.assertIn(filerelative_layer, bblayers) |
| 215 | 215 | ||
| 216 | if 'oe-fragment' in bitbake_config.keys(): | 216 | if 'oe-fragment' in bitbake_config.keys(): |
| 217 | for f in bitbake_config["oe-fragments"]: | 217 | for f in bitbake_config["oe-fragments"]: |
| @@ -298,7 +298,7 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) | |||
| 298 | 'gizmo-env-passthrough', | 298 | 'gizmo-env-passthrough', |
| 299 | 'gizmo-no-fragment', | 299 | 'gizmo-no-fragment', |
| 300 | 'gadget-notemplate','gizmo-notemplate', | 300 | 'gadget-notemplate','gizmo-notemplate', |
| 301 | 'gizmo-notemplate-with-relative-layers')} | 301 | 'gizmo-notemplate-with-filerelative-layers')} |
| 302 | } | 302 | } |
| 303 | for cf, v in test_configurations.items(): | 303 | for cf, v in test_configurations.items(): |
| 304 | for c in v['buildconfigs']: | 304 | for c in v['buildconfigs']: |
