]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: toaster: models List only have the specified project's imported layers
authorMichael Wood <michael.g.wood@intel.com>
Wed, 9 Mar 2016 13:01:24 +0000 (13:01 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 9 Mar 2016 22:47:29 +0000 (22:47 +0000)
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]

(Bitbake rev: de8baedaccb451c12bc3f642449db3f64aed6bf7)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/toaster/orm/models.py

index cfc6ea87c2eace217b5aced5c8235d1d34efc70f..add2adea06f8f4fb0b2d1cac61b474c9c380a7eb 100644 (file)
@@ -262,8 +262,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