diff options
author | S. Lockwood-Childs <sjl@vctlabs.com> | 2017-02-20 01:07:07 -0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-02-22 13:16:48 +0100 |
commit | ace4a93016099d0f0e5151a6a88e82175f9fe77c (patch) | |
tree | a7fadf780c4786901ad3b2cd680a25bb22931286 /meta-oe | |
parent | 411f5caabc8280d1a93e3b61459d80450cf5344d (diff) | |
download | meta-openembedded-ace4a93016099d0f0e5151a6a88e82175f9fe77c.tar.gz |
gitpkgv.bbclass: fix versioning with multiple repos
gitpkgv class is supposed to use SRCREV_FORMAT variable to define
how to smoosh together revision info from multiple repos that are
used in a single recipe. It is incorrectly repeating the rev hash
for the first repo instead of including the rev from each listed repo.
Example:
SRC_URI = "git://some-server/purple.git;destsuffix=git/purple;name=purple"
SRC_URI += "git://other-server/blue.git;destsuffix=git/blue;name=blue"
SRCREV_purple = "${AUTOREV}"
SRCREV_blue = "${AUTOREV}"
SRCREV_FORMAT = "purple_blue"
Suppose gitpkgv calculates "67+ea121ea" for purple repo,
and "123+feef001" for blue repo. This should result in a
package version with them joined together like so:
"67+ea121ea_123+feef001"
It didn't. Instead the git hash part for the first repo got repeated:
"67+ea121ea_123+ea121ea"
Fix this by looking in the right place for the git revisions of 2nd
(and following) repos when assembling the full version string.
Signed-off-by: S. Lockwood-Childs <sjl@vctlabs.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/classes/gitpkgv.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta-oe/classes/gitpkgv.bbclass b/meta-oe/classes/gitpkgv.bbclass index 3949b43c2..2d9680a35 100644 --- a/meta-oe/classes/gitpkgv.bbclass +++ b/meta-oe/classes/gitpkgv.bbclass | |||
@@ -110,9 +110,9 @@ def get_git_pkgv(d, use_tags): | |||
110 | d, quiet=True).strip() | 110 | d, quiet=True).strip() |
111 | ver = gitpkgv_drop_tag_prefix(output) | 111 | ver = gitpkgv_drop_tag_prefix(output) |
112 | except Exception: | 112 | except Exception: |
113 | ver = "0.0-%s-g%s" % (commits, rev[:7]) | 113 | ver = "0.0-%s-g%s" % (commits, vars['rev'][:7]) |
114 | else: | 114 | else: |
115 | ver = "%s+%s" % (commits, rev[:7]) | 115 | ver = "%s+%s" % (commits, vars['rev'][:7]) |
116 | 116 | ||
117 | format = format.replace(name, ver) | 117 | format = format.replace(name, ver) |
118 | 118 | ||