aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Mery <amery@hanoverdisplays.com>2017-06-13 10:47:55 +0100
committerArmin Kuster <akuster808@gmail.com>2017-06-26 11:35:51 -0700
commitc90b1753c9c34ed16613d8979613460c85f4295c (patch)
treefb98277b0c53f56482674bc896c65d8bc5ff49cb
parent2a53b11d6cd99c05868c8d04e78c1c9ffd0a59ac (diff)
downloadmeta-openembedded-contrib-c90b1753c9c34ed16613d8979613460c85f4295c.tar.gz
meta-openembedded-contrib-c90b1753c9c34ed16613d8979613460c85f4295c.tar.bz2
meta-openembedded-contrib-c90b1753c9c34ed16613d8979613460c85f4295c.zip
gitver: extend class to use EXTERNALSRC if set
Signed-off-by: Alejandro Mery <amery@hanoverdisplays.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/classes/gitver.bbclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta-oe/classes/gitver.bbclass b/meta-oe/classes/gitver.bbclass
index b677996ea6..adb434a46b 100644
--- a/meta-oe/classes/gitver.bbclass
+++ b/meta-oe/classes/gitver.bbclass
@@ -24,7 +24,8 @@ def get_git_pv(path, d, tagadjust=None):
import os
import bb.process
- gitdir = os.path.abspath(os.path.join(d.getVar("S", True), ".git"))
+ srcdir = d.getVar("EXTERNALSRC", True) or d.getVar("S", True)
+ gitdir = os.path.abspath(os.path.join(srcdir, ".git"))
try:
ver = gitrev_run("git describe --tags", gitdir)
except Exception as exc:
@@ -71,5 +72,6 @@ def mark_recipe_dependencies(path, d):
mark_dependency(d, tagdir)
python () {
- mark_recipe_dependencies(d.getVar("S", True), d)
+ srcdir = d.getVar("EXTERNALSRC", True) or d.getVar("S", True)
+ mark_recipe_dependencies(srcdir, d)
}