From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 8E257E00C96; Thu, 10 Mar 2016 03:27:35 -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.49 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-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id D7390E00B45 for ; Thu, 10 Mar 2016 03:27:32 -0800 (PST) Received: by mail-wm0-f49.google.com with SMTP id l68so25606359wml.0 for ; Thu, 10 Mar 2016 03:27:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=nuvvQOEtx0/v18d3TLjmpdZpSf3HMU3+KjkQjVR0VS8=; b=VYF2DbZsx1XKFPhJeempNukxitwBZBQq9DOPCyec/+SVbpNtzjBiMzHdiRjlIHFkP5 WsYJurQDSyz/uEm20hDea+RsC0MxwJluxQWvbQ9m6EsEZoD/rg2SU98MFVhhoAvoD21w ZqT6k/xIa0LRgiku9gJWtwD9QmgSpvATYXLpQD8uKyRaiXFarK/Qm0UyiNLn1yL5q4mj ys3aedCUkL7jc/IzMLYUjVWO5TfDpS2Na7o7buIgdfaJu56Zc1l7AGU2spse0XbW6lkR YRxbPfV4aVtbhPrv6MG4cih8X3z92dMPFPjth7sgXaczNdOf+C7+qFqavPN2ltwgdTRo qEtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=nuvvQOEtx0/v18d3TLjmpdZpSf3HMU3+KjkQjVR0VS8=; b=lvDHT9Wlclg5+Ut97FPNv71QCQg+eZVMt7Gs4/2WMbq+6l2flbwmOQu1XGccIAvUPv aKsViD2EHxSLgxuUk4T5iBvsuleAwX/Yr70PdZo5Mj5bAKij1qn2lhfAz/W5aTEyH0D5 zSshhSZePJcmPG2KSjdV2gkJDnxLVj00/EotInaHTHAmULjItdN86lEOHbxIOre9jasz z7cDHAqh/guK5J9Ov0ocDw0Bi8HhL/EAiLDXJ3qnIBOE1ZlaxGmu7DIIFsQxPr3vdt+J Vr9CNLIyDS54r37gwIH/yrfGEqCwh8LkBGMjSwmjd1S1Tzd+Tv2h1w6MEgXcEkcPRH50 GUew== X-Gm-Message-State: AD7BkJIUm2Svep9AG0wpOnDvaudWrb1uDpNA8d20WPFgAcTvBMs888KHn2rO1EMV87zWLlGH X-Received: by 10.28.189.70 with SMTP id n67mr3076016wmf.45.1457609251651; Thu, 10 Mar 2016 03:27:31 -0800 (PST) Received: from [192.168.2.24] ([83.217.123.106]) by smtp.googlemail.com with ESMTPSA id ls5sm3040157wjb.33.2016.03.10.03.27.30 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 10 Mar 2016 03:27:31 -0800 (PST) From: Michael Wood To: toaster@yoctoproject.org References: <1457548997-14685-1-git-send-email-michael.g.wood@intel.com> Message-ID: <56E15A22.2000003@intel.com> Date: Thu, 10 Mar 2016 11:27:30 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1457548997-14685-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH] 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: Thu, 10 Mar 2016 11:27:35 -0000 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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] [YOCTO #8545] 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 7fedb76..2dba00a 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py @@ -358,12 +358,17 @@ class ORMWrapper(object): # create a new copy of this layer version as a snapshot for # historical purposes - layer_copy, c = Layer_Version.objects.get_or_create(build=build_obj, - layer=layer_obj.layer, - commit=layer_version_information['commit'], - local_path = layer_version_information['local_path'], - ) - logger.info("created new historical layer version %d", layer_copy.pk) + layer_copy, c = Layer_Version.objects.get_or_create( + build=build_obj, + layer=layer_obj.layer, + up_branch=layer_obj.up_branch, + branch=layer_version_information['branch'], + commit=layer_version_information['commit'], + local_path=layer_version_information['local_path'], + ) + + logger.info("created new historical layer version %d", + layer_copy.pk) self.layer_version_built.append(layer_copy) @@ -584,11 +589,15 @@ class ORMWrapper(object): packagedict[p]['object'].package_dependencies_target.all().delete() packagedict[p]['object'].package_dependencies_source.all().delete() try: - recipe = self._cached_get(Recipe, - name=built_recipe.name, - layer_version__build=None, - file_path=built_recipe.file_path, - version=built_recipe.version) + recipe = self._cached_get( + Recipe, + name=built_recipe.name, + layer_version__build=None, + layer_version__up_branch= + built_recipe.layer_version.up_branch, + file_path=built_recipe.file_path, + version=built_recipe.version + ) except (Recipe.DoesNotExist, Recipe.MultipleObjectsReturned) as e: logger.info("We did not find one recipe for the" -- 1.9.1