[Toaster] [PATCH] toaster: models List only have the specified project's imported layers

Smith, Elliot elliot.smith at intel.com
Wed Mar 9 05:04:41 PST 2016


Tested (as per https://bugzilla.yoctoproject.org/show_bug.cgi?id=8944#c0),
sent to bitbake-devel, and added to toaster-next.

Elliot

On 8 March 2016 at 20:11, Michael Wood <michael.g.wood at intel.com> wrote:

> Don't think this has been upstreamed yet
>
> On 17/02/16 09:48, Barros Pena, Belen wrote:
>
>>
>> On 16/02/2016 11:25, "toaster-bounces at yoctoproject.org on behalf of
>> Michael Wood" <toaster-bounces at yoctoproject.org on behalf of
>> michael.g.wood at intel.com> wrote:
>>
>> When returning the compatible layers make sure that we are only
>>> listing: All the layers which are for this release && configuration
>>> layers (i.e. aren't part of the build history) and which aren't an
>>> imported layer OR are this project's imported layer(s).
>>>
>>> [YOCTO #8944]
>>>
>> I can no longer reproduce the problem in 8944 with this patch, and I can
>> happily import a layer with the same name to a different project.
>>
>> Thanks!
>>
>> Belén
>>
>> Signed-off-by: Michael Wood <michael.g.wood at intel.com>
>>> ---
>>> bitbake/lib/toaster/orm/models.py | 6 ++++--
>>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/bitbake/lib/toaster/orm/models.py
>>> b/bitbake/lib/toaster/orm/models.py
>>> index ab6940f..50f703c 100644
>>> --- a/bitbake/lib/toaster/orm/models.py
>>> +++ b/bitbake/lib/toaster/orm/models.py
>>> @@ -259,8 +259,10 @@ class Project(models.Model):
>>>          """ Returns Queryset of all Layer_Versions which are compatible
>>> with
>>>          this project"""
>>>          queryset = Layer_Version.objects.filter(
>>> -            (Q(up_branch__name=self.release.branch_name) &
>>> Q(build=None))
>>> -            | Q(project=self))
>>> +            (Q(up_branch__name=self.release.branch_name) &
>>> +             Q(build=None) &
>>> +             Q(project=None)) |
>>> +             Q(project=self))
>>>
>>>          return queryset
>>>
>>> --
>>> 2.1.4
>>>
>>> --
>>> _______________________________________________
>>> toaster mailing list
>>> toaster at yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/toaster
>>>
>>
> --
> _______________________________________________
> toaster mailing list
> toaster at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/toaster
>



-- 
Elliot Smith
Software Engineer
Intel Open Source Technology Centre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/toaster/attachments/20160309/a433cc5c/attachment-0001.html>


More information about the toaster mailing list