Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 887ECE00CB8; Mon, 25 Apr 2016 02:48:17 -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,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -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 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.192.182 listed in list.dnswl.org] Received: from mail-pf0-f182.google.com (mail-pf0-f182.google.com [209.85.192.182]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 4B163E00C81 for ; Mon, 25 Apr 2016 02:48:12 -0700 (PDT) Received: by mail-pf0-f182.google.com with SMTP id n1so66022538pfn.2 for ; Mon, 25 Apr 2016 02:48:12 -0700 (PDT) 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=dhW0km+sjMQ+y+OEyNmlTEyFmDAZwFQF7mBu/2UR1Lk=; b=whnTzgTajBVQCx65fXR8WGo+XzjyOtjfdafKGEEcWkqy2wjFFSmy10lSmZSiHknRpu FY1VwUrbJJcbxKMog+1YCc9wXdxwEGMGBwz/GfIFbN4+bgrRjuDS10dvB72N2EJ4ss/r 6R2u8s1iEHWt90XIyZIaUvYtbICIV81s1ZSzZx5agehkG+gpC7emWWQicn9IaBrUCEPn KcTRq13icyktMk29IFRVrfTlNj2RaRIQnr4iHtZCwSv61UPH8YK+mdSYANzp5ds5Ef3F mnUV5flrY23UkNlLhwodUK8UdEmn8+/5ZGPJQjVbb/WXvWA92Ep3/GicwDXmL2aXAC3w ES4A== 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=dhW0km+sjMQ+y+OEyNmlTEyFmDAZwFQF7mBu/2UR1Lk=; b=YfDKjCTLmG61QEi1iDzNEPmUhuRS4oDHsCQ/JYdiuCe6k/ptAN9uPheZeZkRgSu23s 3Do3gDavgClpOT1UfucGd4f7GOKmRoI9yLMaqFHp8bvcxm5SZjA2R0vLlsEhgVWvTkxd kp8F20hYjNdjHF1cXOh2RRz6Ckf4hufqeMQENN0s/CPDs72JEfZhwoVOrk/QAb1WzSZN BFKPQHybsYrnn+I8LLvNuyx5JNGaEJoEBqA9vekzOcYyFcxiAOkO9TrrjxqIRmI/Nj1y QSHoP6rul7+xI3YEU3ra41AiRVyEIpMDqMfB4p4W7843K82ZcVOdV/a1J4iFqfcfmpe0 oCbA== X-Gm-Message-State: AOPr4FWjGqml3xSAYeGt4vAaeupwn+yWSramBI940lPyW8RhnKEoaYfHJfU5OVlU1FCAodQy X-Received: by 10.98.93.5 with SMTP id r5mr516577pfb.15.1461577692575; Mon, 25 Apr 2016 02:48:12 -0700 (PDT) Received: from dorado.ger.corp.intel.com ([192.55.54.44]) by smtp.gmail.com with ESMTPSA id xs10sm28447712pab.4.2016.04.25.02.48.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Apr 2016 02:48:12 -0700 (PDT) From: Michael Wood To: toaster@yoctoproject.org Date: Mon, 25 Apr 2016 10:48:04 +0100 Message-Id: <1461577684-4768-2-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1461577684-4768-1-git-send-email-michael.g.wood@intel.com> References: <1461577684-4768-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH 2/2] toaster: customrecipe Only show download icon or button if it's possible 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: Mon, 25 Apr 2016 09:48:17 -0000 If the based on recipe has not yet been checked out/cloned we cannot generate the custom image recipe file that uses it. So disable/remove the option to download it. [YOCTO #9425] Signed-off-by: Michael Wood --- bitbake/lib/toaster/toastergui/tables.py | 4 +++- bitbake/lib/toaster/toastergui/templates/customrecipe.html | 13 ++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py index 2cc2f4e..d375da4 100644 --- a/bitbake/lib/toaster/toastergui/tables.py +++ b/bitbake/lib/toaster/toastergui/tables.py @@ -508,10 +508,12 @@ class CustomImagesTable(ToasterTable): recipe_file_template = ''' {{data.name}}_{{data.version}}.bb + {% if data.get_base_recipe_file %} - ''' + + {% endif %}''' self.add_column(title="Recipe file", static_data_name='recipe_file_download', diff --git a/bitbake/lib/toaster/toastergui/templates/customrecipe.html b/bitbake/lib/toaster/toastergui/templates/customrecipe.html index ea3c9c7..aeb4466 100644 --- a/bitbake/lib/toaster/toastergui/templates/customrecipe.html +++ b/bitbake/lib/toaster/toastergui/templates/customrecipe.html @@ -4,6 +4,7 @@ {% load static %} {% block pagecontent %} +{% with recipe.get_base_recipe_file as base_recipe_file %} +{% endwith %}{# end base_recipe_file #} {% endblock %} -- 2.7.4