Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mail.openembedded.org (Postfix) with ESMTP id 4943470149 for ; Tue, 26 Apr 2016 16:18:20 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 26 Apr 2016 09:18:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,537,1455004800"; d="scan'208,217";a="963133155" Received: from mkamins1-mobl.ger.corp.intel.com (HELO lp.ger.corp.intel.com) ([10.252.29.92]) by orsmga002.jf.intel.com with ESMTP; 26 Apr 2016 09:18:19 -0700 From: Elliot Smith To: bitbake-devel@lists.openembedded.org Date: Tue, 26 Apr 2016 17:18:07 +0100 Message-Id: <1461687487-31757-2-git-send-email-elliot.smith@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1461687487-31757-1-git-send-email-elliot.smith@intel.com> References: <1461687487-31757-1-git-send-email-elliot.smith@intel.com> Subject: [PATCH 2/2] toaster: customrecipe Only show download icon or button if it's possible X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussion that advance bitbake development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2016 16:18:21 -0000 From: Michael Wood 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 Signed-off-by: Elliot Smith --- 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 %} -- 1.9.3 --------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.