[oe-commits] [bitbake] 05/05: toaster: test 'commit' first in get_vcs_reference

git at git.openembedded.org git at git.openembedded.org
Tue Jun 27 21:44:05 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

commit b303365ca3a1ba5fb8c6839180f1ec26df60c6ce
Author: David Reyna <David.Reyna at windriver.com>
AuthorDate: Tue Jun 27 13:44:32 2017 -0700

    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 at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/toaster/orm/models.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index 5c14727..630e4a0 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):

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list