Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id E9216E00CE1; Fri, 11 Mar 2016 01:42:53 -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 57EBEE00929 for ; Fri, 11 Mar 2016 01:42:48 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 11 Mar 2016 01:42:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,320,1455004800"; d="scan'208";a="931645707" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by orsmga002.jf.intel.com with ESMTP; 11 Mar 2016 01:42:45 -0800 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.174]) by IRSMSX106.ger.corp.intel.com ([169.254.8.172]) with mapi id 14.03.0248.002; Fri, 11 Mar 2016 09:42:41 +0000 From: "Barros Pena, Belen" To: "Wood, Michael G" , "toaster@yoctoproject.org" Thread-Topic: [Toaster] [PATCH 2/2] toaster: buildinfohelper Add additional metadata to the built layer Thread-Index: AQHRe3padXK7+2nKYUG/XdPvKNPldw== Date: Fri, 11 Mar 2016 09:42:40 +0000 Message-ID: References: <1457620109-9496-1-git-send-email-michael.g.wood@intel.com> <1457620109-9496-2-git-send-email-michael.g.wood@intel.com> In-Reply-To: <1457620109-9496-2-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.1.160122 x-originating-ip: [10.252.20.49] MIME-Version: 1.0 Subject: Re: [PATCH 2/2] toaster: buildinfohelper Add additional metadata to the built layer 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: Fri, 11 Mar 2016 09:42:54 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-ID: <43A83B60BBE6184092EEB7FA46C8AB3C@intel.com> Content-Transfer-Encoding: quoted-printable On 10/03/2016 14:28, "toaster-bounces@yoctoproject.org on behalf of Michael Wood" wrote: >Add additional metadata to the layer created for build history to be >able to identify the layer and recipe later on. Specifically this is the >branch and release to which the recipe and layer are associated with >enabling differentiation of two recipes which are local release and >master and 'master' release. > >[YOCTO #8528] I can't get this to work, I'm afraid. This is what I did: * Created a project with the local release * Built core-image-minimal * When the build finished, went to the image recipes page It still shows 0 image recipes. >[YOCTO #8545] This totally works :) Thanks! Bel=E9n > >Signed-off-by: Michael Wood >--- > bitbake/lib/bb/ui/buildinfohelper.py | 31 ++++++++++++++++++++----------- > 1 file changed, 20 insertions(+), 11 deletions(-) > >diff --git a/bitbake/lib/bb/ui/buildinfohelper.py >b/bitbake/lib/bb/ui/buildinfohelper.py >index 7805086..6b19fda 100644 >--- a/bitbake/lib/bb/ui/buildinfohelper.py >+++ b/bitbake/lib/bb/ui/buildinfohelper.py >@@ -355,12 +355,17 @@ class ORMWrapper(object): >=20 > # create a new copy of this layer version as a snapshot for > # historical purposes >- layer_copy, c =3D >Layer_Version.objects.get_or_create(build=3Dbuild_obj, >- layer=3Dlayer_obj.layer, >- commit=3Dlayer_version_information['commit'], >- local_path =3D >layer_version_information['local_path'], >- ) >- logger.info("created new historical layer version %d", >layer_copy.pk) >+ layer_copy, c =3D Layer_Version.objects.get_or_create( >+ build=3Dbuild_obj, >+ layer=3Dlayer_obj.layer, >+ up_branch=3Dlayer_obj.up_branch, >+ branch=3Dlayer_version_information['branch'], >+ commit=3Dlayer_version_information['commit'], >+ local_path=3Dlayer_version_information['local_path'], >+ ) >+ >+ logger.info("created new historical layer version %d", >+ layer_copy.pk) >=20 > self.layer_version_built.append(layer_copy) >=20 >@@ -581,11 +586,15 @@ class ORMWrapper(object): > =20 >packagedict[p]['object'].package_dependencies_target.all().delete() > =20 >packagedict[p]['object'].package_dependencies_source.all().delete() > try: >- recipe =3D self._cached_get(Recipe, >- name=3Dbuilt_recipe.name, >- layer_version__build=3DNone= , >- =20 >file_path=3Dbuilt_recipe.file_path, >- =20 >version=3Dbuilt_recipe.version) >+ recipe =3D self._cached_get( >+ Recipe, >+ name=3Dbuilt_recipe.name, >+ layer_version__build=3DNone, >+ layer_version__up_branch=3D >+ built_recipe.layer_version.up_branch, >+ file_path=3Dbuilt_recipe.file_path, >+ version=3Dbuilt_recipe.version >+ ) > except (Recipe.DoesNotExist, > Recipe.MultipleObjectsReturned) as e: > logger.info("We did not find one recipe for the" >--=20 >2.1.4 > >--=20 >_______________________________________________ >toaster mailing list >toaster@yoctoproject.org >https://lists.yoctoproject.org/listinfo/toaster