diff options
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
| -rw-r--r-- | bitbake/lib/bb/cooker.py | 19 |
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 |
