[oe-commits] [meta-openembedded] 58/80: gitpkgv: Fix $GITPKV for a single named git source

git at git.openembedded.org git at git.openembedded.org
Wed Aug 31 17:09:17 UTC 2016


martin_jansa pushed a commit to branch master-next
in repository meta-openembedded.

commit 2ce94bf40719069ccd3d467b355a422286793c12
Author: Clemens Lang <clemens.lang at bmw-carit.de>
AuthorDate: Wed Aug 24 14:22:33 2016 +0200

    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 at bmw-carit.de>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 meta-oe/classes/gitpkgv.bbclass | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta-oe/classes/gitpkgv.bbclass b/meta-oe/classes/gitpkgv.bbclass
index 4866fac..8cd4bfd 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():

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list