summaryrefslogtreecommitdiff
path: root/lib/toaster
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-09-28 21:45:28 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-29 13:44:49 +0100
commita3d47eb923dd2cb5259f387c79549822807eca49 (patch)
treee8cd4523c269aee2cd58146ccd7029ab8c7e4cd8 /lib/toaster
parent838e77c7c3c4006abd1327343a004590ab652de9 (diff)
downloadbitbake-a3d47eb923dd2cb5259f387c79549822807eca49.zip
toaster: Prioroitise the layer more generic vcs reference over the sha
When we do a build we update the last commit value that the layer was built at However in future builds we do want to use the named reference rather than the commit sha, e.g. master/fido Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster')
-rw-r--r--lib/toaster/orm/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index 8d7388e2..e0b31a92 100644
--- a/lib/toaster/orm/models.py
+++ b/lib/toaster/orm/models.py
@@ -1155,12 +1155,12 @@ class Layer_Version(models.Model):
return project.compatible_layerversions(layer_name = self.layer.name)
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.up_branch is not None:
return self.up_branch.name
+ if self.commit is not None and len(self.commit) > 0:
+ return self.commit
return ("Cannot determine the vcs_reference for layer version %s" % vars(self))
def get_detailspage_url(self, project_id):