Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 96B03E00CAC; Thu, 10 Mar 2016 06:28:37 -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.48 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-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id C1F2BE00CA9 for ; Thu, 10 Mar 2016 06:28:36 -0800 (PST) Received: by mail-wm0-f48.google.com with SMTP id p65so31033134wmp.1 for ; Thu, 10 Mar 2016 06:28:36 -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:in-reply-to:references; bh=bLxUue5BoGQGxw0/t3ZDbMvtGArzvFRXxlf19ZZkVTI=; b=FzYVHdzvxnMT2P6omI+a6QpNL3PPoVwU2lf300ieIiuD9iaUfjBc9S621gZeKUWKX/ dY2pTxQgsJ/5NWbxKuren6MK9f+EXnFxIxwKIj4eOnVoDYwoOqwKyAz9K0ekauR3w1r5 hFOrFOYPwtu06JKFizRWoKqmqUFYq2qVOnZnsemCdjEhQHYpaBjKhKSXFczyx2oNNcwe WvADoGtO7+eeeAbhHn9qkJErJ+Q3hLEqnygZ1jLyi9PhRvfEO7rQNayEZHizdRkxQxqv d8S0dY1FWa0RrtW5/9Rs9aBTrcmLJk3/GsJfXm1xn5bwRf8p3JFgojAOtPwGUNggD+PM k1qw== 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:in-reply-to :references; bh=bLxUue5BoGQGxw0/t3ZDbMvtGArzvFRXxlf19ZZkVTI=; b=CrUAGH3vjh4sNHUJcBAczqlCVEnqh4fTGwY2+aPxU81vAJ+kiBvfP/nU/gMsdYFqIk Chs6JIYXUaVLKlLC+ux2/BOaKp0bx8SuGFqARJR+BIDVS3H1MTAsXqZMxvAcbh6BRsNP cyHzwsvQ1eQqknLvEs80UaMoV22p3erffAYZd3xf2vnAjTKp6BLC7z/kHJdGVxhDghNo wFJRfrXPzQNzkRFgKsgi8wZoONV57XsWGjYGGR3NbPS9oNVhQQIIKTVvh/6jpg/fBFSQ l7o7Z5Ak2gr6uRL+Sjj0Vd0hAYhGhmv0Ao5YjlqI3BG2WIpcI61aQ/ekDe2tQXQgOshu liQA== X-Gm-Message-State: AD7BkJKrlPNptrmcuSSChoPKhsJYBU5HxOGr2kNzZlq3lnROqLviP5RRXxt4XuHfNiGGVkq6 X-Received: by 10.194.192.36 with SMTP id hd4mr4020943wjc.85.1457620115365; Thu, 10 Mar 2016 06:28:35 -0800 (PST) Received: from draco.icx.intel.com ([83.217.123.106]) by smtp.gmail.com with ESMTPSA id lh1sm3784363wjb.20.2016.03.10.06.28.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Mar 2016 06:28:34 -0800 (PST) From: Michael Wood To: toaster@yoctoproject.org Date: Thu, 10 Mar 2016 14:28:29 +0000 Message-Id: <1457620109-9496-2-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1457620109-9496-1-git-send-email-michael.g.wood@intel.com> References: <1457620109-9496-1-git-send-email-michael.g.wood@intel.com> Subject: [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: Thu, 10 Mar 2016 14:28:37 -0000 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 7805086..6b19fda 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py @@ -355,12 +355,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) @@ -581,11 +586,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" -- 2.1.4