diff options
| author | Alejandro Mery <amery@hanoverdisplays.com> | 2017-06-13 10:47:55 +0100 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2017-09-13 17:16:28 -0700 |
| commit | 84d8c2028a8f4472ee0aef9074137d4e78ce1b46 (patch) | |
| tree | 6cba49b33b1023f233025daba24f97108c3c48c9 /meta-oe/classes | |
| parent | 425b672bff822c5c54f0f1bb669b6f5ba9594f1d (diff) | |
| download | meta-openembedded-84d8c2028a8f4472ee0aef9074137d4e78ce1b46.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>
(cherry picked from commit c4731b2a5a8af54d78ce2735c1c488e5b8183863)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/classes')
| -rw-r--r-- | meta-oe/classes/gitver.bbclass | 6 |
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): | |||
| 24 | import os | 24 | import os |
| 25 | import bb.process | 25 | import bb.process |
| 26 | 26 | ||
| 27 | gitdir = os.path.abspath(os.path.join(d.getVar("S"), ".git")) | 27 | srcdir = d.getVar("EXTERNALSRC") or d.getVar("S") |
| 28 | gitdir = os.path.abspath(os.path.join(srcdir, ".git")) | ||
| 28 | try: | 29 | try: |
| 29 | ver = gitrev_run("git describe --tags", gitdir) | 30 | ver = gitrev_run("git describe --tags", gitdir) |
| 30 | except Exception as exc: | 31 | except Exception as exc: |
| @@ -71,5 +72,6 @@ def mark_recipe_dependencies(path, d): | |||
| 71 | mark_dependency(d, tagdir) | 72 | mark_dependency(d, tagdir) |
| 72 | 73 | ||
| 73 | python () { | 74 | python () { |
| 74 | mark_recipe_dependencies(d.getVar("S"), d) | 75 | srcdir = d.getVar("EXTERNALSRC") or d.getVar("S") |
| 76 | mark_recipe_dependencies(srcdir, d) | ||
| 75 | } | 77 | } |
