Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id A32A5E00AD9; Fri, 18 Sep 2015 12:05:36 -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.220.43 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 33909E006F7 for ; Fri, 18 Sep 2015 12:05:32 -0700 (PDT) Received: by pacfv12 with SMTP id fv12so59107896pac.2 for ; Fri, 18 Sep 2015 12:05:32 -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=/d5sVfN25LIn7KN1KAD40pw06/Tuh59S9j8jqBY8xms=; b=YY9qsV5iiKb6tFvegzbKqi6U5mIJnT5+l6mpyrZYV9YAs7uImQ9wD2xAB6oxe4k5CR IunDPDqZhINoWwjTh0CUmYHyGbL4BercjMDJrbdhBnbpqcGQD3hBMR5gVt6lhQs6pKPb mvZNd2KHwPfeyeaqyZGihcds6pIeki58kZ1LB6YoiWpPi8mWOgzP+URHNIcxSBCRcmyq GkFSMdO210JcmH6ojcgubWtAKkAYHMiaim8WuRHjYqjVNYTqxhtveg1uFj9jjtJow7Mb BfMxrjNe5i6eKdYtac5yXbEVru0bGEuMuNYneiwmtuau81TUEzmakr2Jfo8Fyj75JmXo 0FeQ== X-Gm-Message-State: ALoCoQl/oCgL8fYqAoiagpoBDZnLNVFZfE07wkMBigZUMvh/Sw9kCxmgcKC21DVCM1jV3iV+yZo5 X-Received: by 10.68.166.97 with SMTP id zf1mr8856018pbb.72.1442603132340; Fri, 18 Sep 2015 12:05:32 -0700 (PDT) Received: from draco.ger.corp.intel.com (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id kh7sm10342357pbc.93.2015.09.18.12.05.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Sep 2015 12:05:31 -0700 (PDT) From: Michael Wood To: toaster@yoctoproject.org Date: Fri, 18 Sep 2015 20:05:06 +0100 Message-Id: <1442603107-31741-3-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1442603107-31741-1-git-send-email-michael.g.wood@intel.com> References: <55FC5FA0.20105@intel.com> <1442603107-31741-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH 3/4] 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, 18 Sep 2015 19:05:36 -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 5240ea5..44bbc97 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -1153,12 +1153,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