summaryrefslogtreecommitdiffstats
path: root/meta/classes/metadata_scm.bbclass
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2016-04-29 19:03:45 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-11 10:33:42 +0100
commit88d5f563c9c10d83538072404c9c8ed20c51a8d8 (patch)
tree6194f98b6673d626380d3c694f2792a9b8c4529d /meta/classes/metadata_scm.bbclass
parent361c5be77f6e32d6eb68b94b93840c34453ba3f2 (diff)
downloadpoky-88d5f563c9c10d83538072404c9c8ed20c51a8d8.tar.gz
metadata_scm.bbclass: Do not assume ${COREBASE} is a Git repo
The functions base_detect_revision() and base_detect_branch() try to extract SCM meta information from the path returned by base_get_scmbasepath(), which currently returns ${COREBASE}. However, making the assumption that ${COREBASE} contains SCM meta information can be false. It is true for Poky, but not necessarily other environments. A better option is to look for the SCM meta information based on the meta layer. Since this works as expected for Git but not SVN, the call to base_get_metadata_svn_revision() from base_detect_revision() was also removed. This is not expected to affect anyone (partly based on the comment in base_get_metadata_svn_revision()). (From OE-Core rev: 53fd0a4a37023642a770a9fbf3cd5511d3c82af7) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/metadata_scm.bbclass')
-rw-r--r--meta/classes/metadata_scm.bbclass5
1 files changed, 2 insertions, 3 deletions
diff --git a/meta/classes/metadata_scm.bbclass b/meta/classes/metadata_scm.bbclass
index 0f7f4235a3..2e6fac209a 100644
--- a/meta/classes/metadata_scm.bbclass
+++ b/meta/classes/metadata_scm.bbclass
@@ -4,8 +4,7 @@ METADATA_REVISION ?= "${@base_detect_revision(d)}"
4def base_detect_revision(d): 4def base_detect_revision(d):
5 path = base_get_scmbasepath(d) 5 path = base_get_scmbasepath(d)
6 6
7 scms = [base_get_metadata_git_revision, \ 7 scms = [base_get_metadata_git_revision]
8 base_get_metadata_svn_revision]
9 8
10 for scm in scms: 9 for scm in scms:
11 rev = scm(path, d) 10 rev = scm(path, d)
@@ -27,7 +26,7 @@ def base_detect_branch(d):
27 return "<unknown>" 26 return "<unknown>"
28 27
29def base_get_scmbasepath(d): 28def base_get_scmbasepath(d):
30 return d.getVar( 'COREBASE', True) 29 return os.path.join(d.getVar('COREBASE', True), 'meta')
31 30
32def base_get_metadata_monotone_branch(path, d): 31def base_get_metadata_monotone_branch(path, d):
33 monotone_branch = "<unknown>" 32 monotone_branch = "<unknown>"