path: root/layerindex/update.py
diff options
authorRobert Yang <liezhi.yang@windriver.com>2017-12-27 15:35:20 +0800
committerPaul Eggleton <paul.eggleton@linux.intel.com>2018-02-05 10:58:13 +1300
commit2a4fa9a1b8d46c2881b55fd91ce2c1abc7435596 (patch)
treeaa7f6620a879e452f655fbed9800cda77fe7c6c3 /layerindex/update.py
parentab4693f8ab3a1b264a04a9bf087ba545959961ac (diff)
update.py: make sure oe-core is fetched
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.yang@windriver.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'layerindex/update.py')
1 files changed, 7 insertions, 1 deletions
diff --git a/layerindex/update.py b/layerindex/update.py
index dc20b303ae..d5bd18d133 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)