From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id CA1CCE00FCE; Fri, 25 Sep 2015 11:08:08 -0700 (PDT) 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,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 * [209.85.212.181 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 5910FE01003 for ; Fri, 25 Sep 2015 11:07:57 -0700 (PDT) Received: by wicfx3 with SMTP id fx3so32302450wic.1 for ; Fri, 25 Sep 2015 11:07:56 -0700 (PDT) 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=5HWDgW80iSVXzoMuVAS3YjSg2V7hHl37eQifYbqJhE0=; b=d9C0Y1H+jCpJeQhBtVaDvk27gLXEc51kPHMAxxzbNj4eI2o0DMmOIREoq1zWM4p3AK rGHLKjsNyAL/cbw60v/4pVE3jFwXsF+mHSh5pi7OtXy6JDM1mNSKXpUYvDVU+yHl3ygY mIsIDInP4lygtw/gJMrOa8MxKLVIcKna8XgM8+g2EdsDY4Kg4gM+/nzdQYJgF9MxJN7P +SkYVXzq9Xr/Ph6FA5ik0x4gt1wGh/4KbF3R3GNgODuvpWgfY3lV80UFELu06Yru/X2q 6UbZe84eFdr99baA4Lg3xa7j/MFS1XxN8aiureD375tO1wBJeQ5l/lj0IjXF7eePm3Jy tnzA== X-Gm-Message-State: ALoCoQl6yJ3tj7buW4B6NHUu5Ff9o1ixoi1SHqKtwd2/vK91OY79BQ1wvQy18isVhIxyZ5DusVyZ X-Received: by 10.194.112.104 with SMTP id ip8mr7766729wjb.131.1443204476804; Fri, 25 Sep 2015 11:07:56 -0700 (PDT) Received: from draco.isw.intel.com ([83.217.123.106]) by smtp.gmail.com with ESMTPSA id uq5sm4511789wjc.3.2015.09.25.11.07.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 Sep 2015 11:07:56 -0700 (PDT) From: Michael Wood To: toaster@yoctoproject.org Date: Fri, 25 Sep 2015 19:07:29 +0100 Message-Id: <1443204452-32244-19-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1443204452-32244-1-git-send-email-michael.g.wood@intel.com> References: <1443204452-32244-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH 18/21] toaster: Prioroitise the layer more generic vcs reference over the sha 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, 25 Sep 2015 18:08:08 -0000 When we do a build we update the last commit value that the layer was built at However in future builds we do want to use the named reference rather than the commit sha, e.g. master/fido Signed-off-by: Michael Wood --- bitbake/lib/toaster/orm/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 8d7388e..e0b31a9 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -1155,12 +1155,12 @@ class Layer_Version(models.Model): return project.compatible_layerversions(layer_name = self.layer.name) def get_vcs_reference(self): - if self.commit is not None and len(self.commit) > 0: - return self.commit if self.branch is not None and len(self.branch) > 0: return self.branch if self.up_branch is not None: return self.up_branch.name + if self.commit is not None and len(self.commit) > 0: + return self.commit return ("Cannot determine the vcs_reference for layer version %s" % vars(self)) def get_detailspage_url(self, project_id): -- 2.1.4