diff options
author | Cristiana Voicu <cristiana.voicu@intel.com> | 2012-12-12 13:51:51 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-12-14 13:06:16 +0000 |
commit | 22007cf71a00fbb03b40f97201a6eb06c9aebd16 (patch) | |
tree | 9a036ec72e124142013da97653c90d53dd966b35 /lib/bb/cooker.py | |
parent | 4a36a1af71530afc8fa896271fa94362ead176bd (diff) | |
download | bitbake-22007cf71a00fbb03b40f97201a6eb06c9aebd16.tar.gz |
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]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/cooker.py')
-rw-r--r-- | lib/bb/cooker.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 6b58f91c6..1d38164f5 100644 --- a/lib/bb/cooker.py +++ b/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 |