summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster
diff options
context:
space:
mode:
authorDavid Reyna <David.Reyna@windriver.com>2017-06-27 13:44:32 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-28 16:02:15 +0100
commitb4b2e6d4dfa4bac7aec100bae4bca36e371e4ed9 (patch)
tree434ddad83e0b9a26c704197f003be9a93e1da2bb /bitbake/lib/toaster
parenteea5cb317137d71ad0cab954d2c9ad2069580b6f (diff)
downloadpoky-b4b2e6d4dfa4bac7aec100bae4bca36e371e4ed9.tar.gz
bitbake: 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] (Bitbake rev: b303365ca3a1ba5fb8c6839180f1ec26df60c6ce) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r--bitbake/lib/toaster/orm/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 5c14727a70..630e4a0003 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -1516,12 +1516,12 @@ class Layer_Version(models.Model):
1516 return self._handle_url_path(self.layer.vcs_web_tree_base_url, '') 1516 return self._handle_url_path(self.layer.vcs_web_tree_base_url, '')
1517 1517
1518 def get_vcs_reference(self): 1518 def get_vcs_reference(self):
1519 if self.commit is not None and len(self.commit) > 0:
1520 return self.commit
1519 if self.branch is not None and len(self.branch) > 0: 1521 if self.branch is not None and len(self.branch) > 0:
1520 return self.branch 1522 return self.branch
1521 if self.release is not None: 1523 if self.release is not None:
1522 return self.release.name 1524 return self.release.name
1523 if self.commit is not None and len(self.commit) > 0:
1524 return self.commit
1525 return 'N/A' 1525 return 'N/A'
1526 1526
1527 def get_detailspage_url(self, project_id=None): 1527 def get_detailspage_url(self, project_id=None):