diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-06 22:57:40 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-11 23:26:29 +0000 |
| commit | fdced52387613a09368716d1f3bb7a13a6edd46d (patch) | |
| tree | bf567799762d0b27f80e563193553d78fff28ad6 /meta/classes | |
| parent | cdc0aeed9b17387ea37dcbfef7d474cce372e8db (diff) | |
| download | poky-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/classes')
| -rw-r--r-- | meta/classes/image.bbclass | 25 |
1 files changed, 23 insertions, 2 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 | ||
| 252 | fakeroot python do_image () { | 252 | fakeroot 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 | } |
| 258 | do_image[dirs] = "${TOPDIR}" | 267 | do_image[dirs] = "${TOPDIR}" |
| 259 | do_image[umask] = "022" | 268 | do_image[umask] = "022" |
| 260 | addtask do_image after do_rootfs before do_build | 269 | addtask do_image after do_rootfs before do_build |
| 261 | 270 | ||
| 271 | fakeroot 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 | } | ||
| 278 | do_image_complete[dirs] = "${TOPDIR}" | ||
| 279 | do_image_complete[umask] = "022" | ||
| 280 | addtask do_image_complete after do_image before do_build | ||
| 281 | |||
| 282 | |||
| 262 | MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|${sysconfdir}|${nonarch_base_libdir}/udev|/lib/modules/[^/]*/modules.*|" | 283 | MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|${sysconfdir}|${nonarch_base_libdir}/udev|/lib/modules/[^/]*/modules.*|" |
| 263 | MULTILIB_CHECK_FILE = "${WORKDIR}/multilib_check.py" | 284 | MULTILIB_CHECK_FILE = "${WORKDIR}/multilib_check.py" |
| 264 | MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib" | 285 | MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib" |
