From f9d9cc87c59e309516c3e8db423715139f6a8f62 Mon Sep 17 00:00:00 2001 From: Cristiana Voicu Date: Wed, 12 Dec 2012 13:51:51 +0200 Subject: bitbake: hob/bitbake: custom image is now using the base image Till now, a custom image made in Hob was using only the packages from the base image. Now it is using everything declared in the base image. Also next to hob-image.bb, it creates another .bb file which is used in building process. Those images are ignored by git. [YOCTO #2601] (Bitbake rev: 22007cf71a00fbb03b40f97201a6eb06c9aebd16) Signed-off-by: Cristiana Voicu Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'bitbake/lib/bb/cooker.py') diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 6b58f91c6b..1d38164f56 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -1188,6 +1188,25 @@ class BBCooker: self.server_registration_cb(buildTargetsIdle, rq) + def generateNewImage(self, image, base_image, package_queue): + ''' + Create a new image with a "require" base_image statement + ''' + image_name = os.path.splitext(image)[0] + timestr = time.strftime("-%Y%m%d-%H%M%S") + dest = image_name + str(timestr) + ".bb" + + with open(dest, "w") as imagefile: + imagefile.write("require " + base_image + "\n") + package_install = "PACKAGE_INSTALL_forcevariable = \"" + for package in package_queue: + package_install += str(package) + " " + package_install += "\"\n" + imagefile.write(package_install) + + self.state = state.initial + return timestr + def updateCache(self): if self.state == state.running: return -- cgit v1.2.3-54-g00ecf