aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorAlejandro Mery <amery@hanoverdisplays.com>2017-06-13 10:47:55 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2017-06-14 14:51:17 +0200
commitc4731b2a5a8af54d78ce2735c1c488e5b8183863 (patch)
tree1064d9112df9ea471ad4bb7c01209d8b90242f18 /meta-oe
parent25ca0801b86e791e7b603e95d479dc6f6cedf7a2 (diff)
downloadmeta-openembedded-c4731b2a5a8af54d78ce2735c1c488e5b8183863.tar.gz
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>
Diffstat (limited to 'meta-oe')
-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 a16429aa89..73521d5382 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"), ".git"))
+ srcdir = d.getVar("EXTERNALSRC") or d.getVar("S")
+ 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"), d)
+ srcdir = d.getVar("EXTERNALSRC") or d.getVar("S")
+ mark_recipe_dependencies(srcdir, d)
}