Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 1993AE0090C; Tue, 16 Feb 2016 02:25:46 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.41 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 98296E008C1 for ; Tue, 16 Feb 2016 02:25:44 -0800 (PST) Received: by mail-wm0-f41.google.com with SMTP id g62so98680395wme.1 for ; Tue, 16 Feb 2016 02:25:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=ADFtKHsNXhR0ZBQ6SwwJQt3yAX7mfiFYcdrwmMcfDZ4=; b=bV3GgG8roGfxqBjsl8+L3NpHJ6Qitp23SOvtcbgtqLKRfjYnjuq6QVXQpQE8UrZOC9 wO3G4YA6yMyZ+KG/0P5QWoMJORP+96RcJ2m2TJJaM6CLpTghqYPTtADJoqsOJ75R9ZMb Hjyjb0a6wKL3DTCuRz1UjBJ7f+vreecKnvJ1Grzl4ywwtP+6+dBSftGNjA1+4Fq+nn0N oHnqPzDdcH/THd2gNV7iryhB8wlky/XuE8LruVlPoaZ4RN+tLMhbtC5TyR52zdL+mCLj Jz08i2d9FNBD7S0S6/cqC6w0oOVpEu6nOKyzlWPq9jmb65OoxiCSYrdxsKRjjktu/yfc oDWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ADFtKHsNXhR0ZBQ6SwwJQt3yAX7mfiFYcdrwmMcfDZ4=; b=FzzWp0Q7RrBNAX7cEkD75zZIkn1WOld/QfJ2MwsHKLP99ZVEGTKIyjVaek3YTMBiGN vhF2bxjf1AyVjR8Y25Eb6hEW2Kzodv1tuSHKU/LA/oo04HvdJuKmthr3iLVmbiC7p+4n 9I6ITrRDyHoeLpgEnbijhJPUjbpYkS/8kdKd3PhDHXmxWrtF/AmqkmQWhpk4zvt0Hv+y XEc6dCAOJxoay2cSlIYH/8GGpqYVxxoH8SBeNy6mO1QiARiDQ98Cq7GtdjsW7OZk1VpC DyKIMXjtkBgOKcxX/jw5+Zoc8gnFceoXZbJrHlIT9xoFKXe6MVVGpc2KtZzgQV5mW0p2 QiYg== X-Gm-Message-State: AG10YOQd7R1skFJ2UJxBglDc5T+x0VGdqXtMPjEdGDzHzxD3+qH5HvQsg7e/5TAwhnDU/4R/ X-Received: by 10.28.172.132 with SMTP id v126mr13047218wme.28.1455618343291; Tue, 16 Feb 2016 02:25:43 -0800 (PST) Received: from draco.home (host109-149-84-27.range109-149.btcentralplus.com. [109.149.84.27]) by smtp.gmail.com with ESMTPSA id x65sm19721334wmg.4.2016.02.16.02.25.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Feb 2016 02:25:42 -0800 (PST) From: Michael Wood To: toaster@yoctoproject.org Date: Tue, 16 Feb 2016 10:25:31 +0000 Message-Id: <1455618331-3332-1-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.1.4 Subject: [PATCH] toaster: models List only have the specified project's imported layers X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2016 10:25:46 -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] Signed-off-by: Michael Wood --- 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