diff options
author | David Reyna <David.Reyna@windriver.com> | 2017-06-27 13:44:32 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-27 22:17:53 +0100 |
commit | b303365ca3a1ba5fb8c6839180f1ec26df60c6ce (patch) | |
tree | db44a2f2160350bc2e5456ffa5e5a02a99d8a923 /lib/toaster | |
parent | 02cb2b7f7ff594de75a404396f39a2428750c798 (diff) | |
download | bitbake-contrib-b303365ca3a1ba5fb8c6839180f1ec26df60c6ce.tar.gz |
toaster: test 'commit' first in get_vcs_reference
The 'commit' value should be tested and used first when resolving the ref
for a layer, since that is an explicit override in each layer index
'layeritem' record. If should take precedence over more-global 'branch'
and 'release' values, instead of being last.
[YOCTO #11515]
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster')
-rw-r--r-- | lib/toaster/orm/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py index 5c14727a7..630e4a000 100644 --- a/lib/toaster/orm/models.py +++ b/lib/toaster/orm/models.py @@ -1516,12 +1516,12 @@ class Layer_Version(models.Model): return self._handle_url_path(self.layer.vcs_web_tree_base_url, '') def get_vcs_reference(self): + if self.commit is not None and len(self.commit) > 0: + return self.commit if self.branch is not None and len(self.branch) > 0: return self.branch if self.release is not None: return self.release.name - if self.commit is not None and len(self.commit) > 0: - return self.commit return 'N/A' def get_detailspage_url(self, project_id=None): |