Fixed: $ ./update.py -l foo -b new_branch INFO: Fetching remote repository foo DEBUG: run cmd 'git fetch -p' in 'foo' [snip] DEBUG: run cmd 'git checkout origin/new_branch' in oe-core ERROR: error: pathspec 'origin/new_branch' did not match any file(s) known to git.
The "new_branch" is newly created, it doesn't exist in local repo since it isn't fetched, it only fetches the layer specified by -l, so only the foo layer is fetched. This patch fixes problem. Signed-off-by: Robert Yang <liezhi.y...@windriver.com> --- layerindex/update.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/layerindex/update.py b/layerindex/update.py index d1e67a0..6359115 100755 --- a/layerindex/update.py +++ b/layerindex/update.py @@ -257,8 +257,14 @@ def main(): bitbakepath = os.path.join(fetchdir, 'bitbake') if not options.nofetch: + # Make sure oe-core is fetched since recipe parsing requires it + layerquery_core = LayerItem.objects.filter(classic=False).filter(name=settings.CORE_LAYER_NAME) + if layerquery_core in layerquery: + layerquery_fetch = list(layerquery) + else: + layerquery_fetch = list(layerquery) + list(layerquery_core) # Fetch latest metadata from repositories - for layer in layerquery: + for layer in layerquery_fetch: # Handle multiple layers in a single repo urldir = layer.get_fetch_dir() repodir = os.path.join(fetchdir, urldir) -- 2.7.4 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto