Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 3928EE007F2; Wed, 17 Feb 2016 01:49:03 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [134.134.136.20 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id B1EA7E00404 for ; Wed, 17 Feb 2016 01:49:01 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP; 17 Feb 2016 01:49:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,459,1449561600"; d="scan'208";a="49339229" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by fmsmga004.fm.intel.com with ESMTP; 17 Feb 2016 01:49:00 -0800 Received: from irsmsx110.ger.corp.intel.com ([169.254.15.31]) by IRSMSX101.ger.corp.intel.com ([169.254.1.113]) with mapi id 14.03.0248.002; Wed, 17 Feb 2016 09:48:58 +0000 From: "Barros Pena, Belen" To: "Wood, Michael G" , "toaster@yoctoproject.org" Thread-Topic: [Toaster] [PATCH] toaster: models List only have the specified project's imported layers Thread-Index: AQHRaWhrlgS18vuxkkagmb7m2Ztocg== Date: Wed, 17 Feb 2016 09:48:57 +0000 Message-ID: References: <1455618331-3332-1-git-send-email-michael.g.wood@intel.com> In-Reply-To: <1455618331-3332-1-git-send-email-michael.g.wood@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.6.0.151221 x-originating-ip: [10.252.17.169] MIME-Version: 1.0 Subject: Re: [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: Wed, 17 Feb 2016 09:49:03 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-ID: <5A38BD1F68166F469A12A86911B05325@intel.com> Content-Transfer-Encoding: quoted-printable On 16/02/2016 11:25, "toaster-bounces@yoctoproject.org on behalf of Michael Wood" 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=E9n > >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 =3D Layer_Version.objects.filter( >- (Q(up_branch__name=3Dself.release.branch_name) & Q(build=3DNo= ne)) >- | Q(project=3Dself)) >+ (Q(up_branch__name=3Dself.release.branch_name) & >+ Q(build=3DNone) & >+ Q(project=3DNone)) | >+ Q(project=3Dself)) >=20 > return queryset >=20 >--=20 >2.1.4 > >--=20 >_______________________________________________ >toaster mailing list >toaster@yoctoproject.org >https://lists.yoctoproject.org/listinfo/toaster