Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mail.openembedded.org (Postfix) with ESMTP id E41A26B464 for ; Mon, 29 Jul 2013 12:57:09 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 29 Jul 2013 05:57:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.89,769,1367996400"; d="scan'208";a="372876037" Received: from cvoicu-vostro-460.rb.intel.com ([10.237.105.72]) by fmsmga001.fm.intel.com with ESMTP; 29 Jul 2013 05:57:09 -0700 From: Cristiana Voicu To: bitbake-devel@lists.openembedded.org Date: Mon, 29 Jul 2013 15:59:23 +0300 Message-Id: <1375102770-14079-10-git-send-email-cristiana.voicu@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1375102770-14079-1-git-send-email-cristiana.voicu@intel.com> References: <1375102770-14079-1-git-send-email-cristiana.voicu@intel.com> Subject: [PATCH_V3 09/16] hob/bitbake: when an image is saved, it should require an image from layers X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 12:57:10 -0000 Saving an image that requires another image will cause issues when the second on is removed. So, we have agreed to "require" only the images from layers. The functionality is implemented in bitbake, in order to be more abstract, and it is used by Hob when an image recipe is saved. [YOCTO #4193] Signed-off-by: Cristiana Voicu --- bitbake/lib/bb/cooker.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index a4a6be6..f009210 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -1143,10 +1143,17 @@ class BBCooker: else: dest = image + if base_image: + with open(base_image, 'r') as f: + require_line = f.readline() + with open(dest, "w") as imagefile: if base_image is None: imagefile.write("inherit image\n") else: + topdir = self.data.getVar("TOPDIR") + if topdir in base_image: + base_image = require_line.split()[1] imagefile.write("require " + base_image + "\n") package_install = "PACKAGE_INSTALL_forcevariable = \"" for package in package_queue: -- 1.7.9.5