bitbake-setup: read fixed revisions json from config dir, not from layer dir
PATCH 1/1 bitbake-setup: read fixed revisions json from config dir, not from layer dir
From: Alexander Kanavin <[email protected]>
The file (or symlink to it) is present in layer dir only if the build was set up by a newer version of bitbake-setup, and otherwise there will be a 'file not found' error. Reading it from config dir maintains compatibility with setups made by previous iterations of bitbake-setup.
Signed-off-by Alexander Kanavin <[email protected]>
--- bin/bitbake-setup | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
bin/bitbake-setup +3 -3
@@ -93,7 +93,7 @@ def _write_layer_list(dest, repodirs): with open(layers_f, 'w') as f: json.dump({"version":"1.0","layers":layers}, f, sort_keys=True, indent=4) -def checkout_layers(layers, layerdir, d): +def checkout_layers(layers, confdir, layerdir, d): def _checkout_git_remote(r_remote, repodir, layers_fixed_revisions): rev = r_remote['rev'] branch = r_remote.get('branch', None)
@@ -118,7 +118,7 @@ def checkout_layers(layers, layerdir, d): os.symlink(src, dst) def _has_local_modifications(r_name, r_path): - fixed_revisions = json.load(open(os.path.join(layerdir, "sources-fixed-revisions.json"))) + fixed_revisions = json.load(open(os.path.join(confdir, "sources-fixed-revisions.json"))) rev = fixed_revisions['sources'][r_name]['git-remote']['rev'] status = bb.process.run('git -C {} status --porcelain'.format(r_path))[0] if status:
@@ -370,7 +370,7 @@ def merge_overrides_into_sources(sources, overrides): def update_build(config, confdir, setupdir, layerdir, d, update_bb_conf="prompt"): layer_config = merge_overrides_into_sources(config["data"]["sources"], config["source-overrides"]["sources"]) - sources_fixed_revisions = checkout_layers(layer_config, layerdir, d) + sources_fixed_revisions = checkout_layers(layer_config, confdir, layerdir, d) bitbake_config = config["bitbake-config"] thisdir = os.path.dirname(config["path"]) if config["type"] == 'local' else None setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir, update_bb_conf)
Signature · 1 line
2.47.3