mirror of
https://git.yoctoproject.org/poky
synced 2026-09-13 00:49:33 +02:00
bitbake: toastergui: update layer search criteria
In order to accomodate the designs around imported layer, we add a "project" field for in the layer versions. The field must be set if and only if the layer is manually imported in the project. This will prevent information leakage between different projects. The views have been updated to perform relevant layer queries in a single location. (Bitbake rev: e1f7ec868b0702dfd27d5708581c134aaa6f4ae8) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
152e2d9cc5
commit
4c82dfbb70
@@ -843,6 +843,8 @@ class Layer_Version(models.Model):
|
||||
dirpath = models.CharField(max_length=255, null = True, default = None) # LayerBranch.vcs_subdir
|
||||
priority = models.IntegerField(default = 0) # if -1, this is a default layer
|
||||
|
||||
project = models.ForeignKey('Project', null = True, default = None) # Set if this layer is project-specific; always set for imported layers, and project-set branches
|
||||
|
||||
# code lifted, with adaptations, from the layerindex-web application https://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/
|
||||
def _handle_url_path(self, base_url, path):
|
||||
import re
|
||||
@@ -902,7 +904,7 @@ class Layer_Version(models.Model):
|
||||
return sorted(
|
||||
Layer_Version.objects.filter( layer__name = self.layer.name, up_branch__name = self.up_branch.name ),
|
||||
key = lambda x: _get_ls_priority(x.layer_source),
|
||||
reverse = False)
|
||||
reverse = True)
|
||||
|
||||
|
||||
def __unicode__(self):
|
||||
|
||||
Reference in New Issue
Block a user