[bitbake-devel] [PATCH 09/14] bitbake: when an image is saved, it should require an image from layers

Cristiana Voicu cristiana.voicu at intel.com
Wed Jul 17 10:35:39 UTC 2013


If the image required is not from the layers and it is removed, when sanity
check is running, Hob will show some errors related to this.
Agreed to "require" only the images from layers.

[YOCTO #4193]
Signed-off-by: Cristiana Voicu <cristiana.voicu at intel.com>
---
 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 9965417..ad92dea 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1147,10 +1147,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




More information about the bitbake-devel mailing list