summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorCristiana Voicu <cristiana.voicu@intel.com>2012-12-12 13:51:51 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-14 13:08:49 +0000
commitf9d9cc87c59e309516c3e8db423715139f6a8f62 (patch)
treeeeed21d7dbd0fce3da1e4d9d30d38155a576b473 /bitbake/lib/bb/cooker.py
parenta947b547d0a5f247e39cbc0fae88c0de5438aa7b (diff)
downloadpoky-f9d9cc87c59e309516c3e8db423715139f6a8f62.tar.gz
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 <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py19
1 files changed, 19 insertions, 0 deletions
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:
1188 1188
1189 self.server_registration_cb(buildTargetsIdle, rq) 1189 self.server_registration_cb(buildTargetsIdle, rq)
1190 1190
1191 def generateNewImage(self, image, base_image, package_queue):
1192 '''
1193 Create a new image with a "require" base_image statement
1194 '''
1195 image_name = os.path.splitext(image)[0]
1196 timestr = time.strftime("-%Y%m%d-%H%M%S")
1197 dest = image_name + str(timestr) + ".bb"
1198
1199 with open(dest, "w") as imagefile:
1200 imagefile.write("require " + base_image + "\n")
1201 package_install = "PACKAGE_INSTALL_forcevariable = \""
1202 for package in package_queue:
1203 package_install += str(package) + " "
1204 package_install += "\"\n"
1205 imagefile.write(package_install)
1206
1207 self.state = state.initial
1208 return timestr
1209
1191 def updateCache(self): 1210 def updateCache(self):
1192 if self.state == state.running: 1211 if self.state == state.running:
1193 return 1212 return