path: root/meta-oe/classes
diff options
authorClemens Lang <clemens.lang@bmw-carit.de>2016-08-24 14:22:33 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2016-09-05 13:30:50 +0200
commitaedcb852ed7ec127dbb4c7cd7655d11f72e0b712 (patch)
tree0779b597573d067e8809268b7f501fc4953ccd8e /meta-oe/classes
parent996f2969bf7ddbd6ee473d5cfd810410e75fb5a2 (diff)
gitpkgv: Fix $GITPKV for a single named git source
Recipes that fetch from a single git source, assign a name to this source and do not set SRCREV_FORMAT to this name will always get a GITPKGV value of "default", which causes version-going-backwards QA errors. Fix this by automatically determining a suitable SRCREV_FORMAT from the SRC_URI if none is set explicitly. This code does not run for multiple git sources, because bitbake's fetcher enforces setting SRCREV_FORMAT when multiple version-controlled sources are used. Signed-off-by: Clemens Lang <clemens.lang@bmw-carit.de> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/classes')
1 files changed, 8 insertions, 1 deletions
diff --git a/meta-oe/classes/gitpkgv.bbclass b/meta-oe/classes/gitpkgv.bbclass
index 4866fac0b..8cd4bfd1e 100644
--- a/meta-oe/classes/gitpkgv.bbclass
+++ b/meta-oe/classes/gitpkgv.bbclass
@@ -61,7 +61,14 @@ def get_git_pkgv(d, use_tags):
format = d.getVar('SRCREV_FORMAT', True)
if not format:
- format = 'default'
+ names = []
+ for url in ud.values():
+ if url.type == 'git' or url.type == 'gitsm':
+ names.extend(url.revisions.keys())
+ if len(names) > 0:
+ format = '_'.join(names)
+ else:
+ format = 'default'
found = False
for url in ud.values():