summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-06 22:57:40 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-11 23:26:29 +0000
commitfdced52387613a09368716d1f3bb7a13a6edd46d (patch)
treebf567799762d0b27f80e563193553d78fff28ad6 /meta
parentcdc0aeed9b17387ea37dcbfef7d474cce372e8db (diff)
downloadpoky-fdced52387613a09368716d1f3bb7a13a6edd46d.tar.gz
image: Move pre/post process commands to bbclass
As the next step in splitting up do_image, move the pre and post processing commands to separate tasks. This also creates the do_image_complete task which acts as the end marker task for image generation. (From OE-Core rev: 800528eaa421d451b596545125cb218e08989151) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/image.bbclass25
-rw-r--r--meta/lib/oe/image.py9
2 files changed, 23 insertions, 11 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 5aca9c48d6..ffad5d28d2 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -251,14 +251,35 @@ addtask rootfs before do_build
251 251
252fakeroot python do_image () { 252fakeroot python do_image () {
253 from oe.image import create_image 253 from oe.image import create_image
254 from oe.image import Image
255 from oe.utils import execute_pre_post_process
254 256
255 # generate final images 257 i = Image(d)
256 create_image(d) 258
259 pre_process_cmds = d.getVar("IMAGE_PREPROCESS_COMMAND", True)
260
261 execute_pre_post_process(d, pre_process_cmds)
262
263 i._remove_old_symlinks()
264
265 i.create()
257} 266}
258do_image[dirs] = "${TOPDIR}" 267do_image[dirs] = "${TOPDIR}"
259do_image[umask] = "022" 268do_image[umask] = "022"
260addtask do_image after do_rootfs before do_build 269addtask do_image after do_rootfs before do_build
261 270
271fakeroot python do_image_complete () {
272 from oe.utils import execute_pre_post_process
273
274 post_process_cmds = d.getVar("IMAGE_POSTPROCESS_COMMAND", True)
275
276 execute_pre_post_process(d, post_process_cmds)
277}
278do_image_complete[dirs] = "${TOPDIR}"
279do_image_complete[umask] = "022"
280addtask do_image_complete after do_image before do_build
281
282
262MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|${sysconfdir}|${nonarch_base_libdir}/udev|/lib/modules/[^/]*/modules.*|" 283MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|${sysconfdir}|${nonarch_base_libdir}/udev|/lib/modules/[^/]*/modules.*|"
263MULTILIB_CHECK_FILE = "${WORKDIR}/multilib_check.py" 284MULTILIB_CHECK_FILE = "${WORKDIR}/multilib_check.py"
264MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib" 285MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib"
diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
index 52ac1e752c..b2b002b190 100644
--- a/meta/lib/oe/image.py
+++ b/meta/lib/oe/image.py
@@ -351,12 +351,6 @@ class Image(ImageDepGraph):
351 351
352 def create(self): 352 def create(self):
353 bb.note("###### Generate images #######") 353 bb.note("###### Generate images #######")
354 pre_process_cmds = self.d.getVar("IMAGE_PREPROCESS_COMMAND", True)
355 post_process_cmds = self.d.getVar("IMAGE_POSTPROCESS_COMMAND", True)
356
357 execute_pre_post_process(self.d, pre_process_cmds)
358
359 self._remove_old_symlinks()
360 354
361 image_cmd_groups = self._get_imagecmds() 355 image_cmd_groups = self._get_imagecmds()
362 356
@@ -406,9 +400,6 @@ class Image(ImageDepGraph):
406 bb.note("Creating symlinks for %s image ..." % image_type) 400 bb.note("Creating symlinks for %s image ..." % image_type)
407 self._create_symlinks(subimages) 401 self._create_symlinks(subimages)
408 402
409 execute_pre_post_process(self.d, post_process_cmds)
410
411
412def create_image(d): 403def create_image(d):
413 Image(d).create() 404 Image(d).create()
414 405