diff options
author | Marius Avram <marius.avram@intel.com> | 2014-03-18 14:17:06 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-24 17:54:46 +0000 |
commit | 299fbbf31aa99d360a7ca884d1f0e0dff24d8887 (patch) | |
tree | 2f5a3bfdca6e186b16893aa288d6f727d3176578 /bitbake/lib/bb/ui/crumbs/hobeventhandler.py | |
parent | 7dd4bf6310c61828dc2ac7777f5adf1004349715 (diff) | |
download | poky-299fbbf31aa99d360a7ca884d1f0e0dff24d8887.tar.gz |
bitbake: hob: output filenames based on initial recipe name
If a recipe for an image was edited from the hob interface the name
of the files outputed in the <build_dir>/tmp/deploy/images/${MACHINE}/ and the
temporary recipes from <build_dir>/recipes/images/ contained only the
generic name "hob-image". From now on both the temporary recipes and
the output from the deploy/ directory will contain the name of the base
recipe appended by the "-edited" suffix, in the case when a base image recipe was
edited. The base recipe can be a standard recipe (e.g core-image-minimal) or
a custom created and saved by the user.
For example, if core-image-minimal is edited the deploy/ directory will contain
core-image-minimal-edited-20140318-140428-qemux86.ext3 and the recipes/images/
directory will contain the recipe core-image-minimal-edited-20140318-140428.bb.
[YOCTO #5002]
(Bitbake rev: f34575809677dc52e1071a3ae3daebe92819cec0)
Signed-off-by: Marius Avram <marius.avram@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hobeventhandler.py')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index 46f36d8adc..73d5f98c39 100644 --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py | |||
@@ -165,14 +165,17 @@ class HobHandler(gobject.GObject): | |||
165 | self.clear_busy() | 165 | self.clear_busy() |
166 | self.building = True | 166 | self.building = True |
167 | target = self.image | 167 | target = self.image |
168 | if target == "hob-image": | 168 | |
169 | if self.base_image: | ||
170 | # Request the build of a custom image | ||
171 | self.generate_hob_base_image(target) | ||
169 | self.set_var_in_file("LINGUAS_INSTALL", "", "local.conf") | 172 | self.set_var_in_file("LINGUAS_INSTALL", "", "local.conf") |
170 | hobImage = self.runCommand(["matchFile", "hob-image.bb"]) | 173 | hobImage = self.runCommand(["matchFile", target + ".bb"]) |
171 | if self.base_image != "Start with an empty image recipe": | 174 | baseImage = self.runCommand(["matchFile", self.base_image + ".bb"]) |
172 | baseImage = self.runCommand(["matchFile", self.base_image + ".bb"]) | 175 | version = self.runCommand(["generateNewImage", hobImage, baseImage, self.package_queue, True, ""]) |
173 | version = self.runCommand(["generateNewImage", hobImage, baseImage, self.package_queue, True, ""]) | 176 | target += version |
174 | target += version | 177 | self.recipe_model.set_custom_image_version(version) |
175 | self.recipe_model.set_custom_image_version(version) | 178 | |
176 | targets = [target] | 179 | targets = [target] |
177 | if self.toolchain_packages: | 180 | if self.toolchain_packages: |
178 | self.set_var_in_file("TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages), "local.conf") | 181 | self.set_var_in_file("TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages), "local.conf") |
@@ -440,10 +443,11 @@ class HobHandler(gobject.GObject): | |||
440 | base_image = self.runCommand(["matchFile", self.base_image + ".bb"]) | 443 | base_image = self.runCommand(["matchFile", self.base_image + ".bb"]) |
441 | self.runCommand(["generateNewImage", image, base_image, package_queue, False, description]) | 444 | self.runCommand(["generateNewImage", image, base_image, package_queue, False, description]) |
442 | 445 | ||
443 | def generate_hob_base_image(self): | 446 | def generate_hob_base_image(self, hob_image): |
444 | image_dir = self.get_topdir() + "/recipes/images/" | 447 | image_dir = self.get_topdir() + "/recipes/images/" |
448 | recipe_name = hob_image + ".bb" | ||
445 | self.ensure_dir(image_dir) | 449 | self.ensure_dir(image_dir) |
446 | self.generate_new_image(image_dir+"hob-image.bb", None, [], "") | 450 | self.generate_new_image(image_dir + recipe_name, None, [], "") |
447 | self.append_to_bbfiles(image_dir + "*.bb") | 451 | self.append_to_bbfiles(image_dir + "*.bb") |
448 | 452 | ||
449 | def ensure_dir(self, directory): | 453 | def ensure_dir(self, directory): |