summaryrefslogtreecommitdiff
path: root/meta/classes
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 15:54:34 +0000
commit800528eaa421d451b596545125cb218e08989151 (patch)
tree1eb806292cc521d9b232a66cc72380f4499e804b /meta/classes
parent57578d0ca6c3aaf6edf0af2c4862d43c97415156 (diff)
downloadopenembedded-core-800528eaa421d451b596545125cb218e08989151.tar.gz
openembedded-core-800528eaa421d451b596545125cb218e08989151.tar.bz2
openembedded-core-800528eaa421d451b596545125cb218e08989151.zip
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/image.bbclass25
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
fakeroot python do_image () {
from oe.image import create_image
+ from oe.image import Image
+ from oe.utils import execute_pre_post_process
- # generate final images
- create_image(d)
+ i = Image(d)
+
+ pre_process_cmds = d.getVar("IMAGE_PREPROCESS_COMMAND", True)
+
+ execute_pre_post_process(d, pre_process_cmds)
+
+ i._remove_old_symlinks()
+
+ i.create()
}
do_image[dirs] = "${TOPDIR}"
do_image[umask] = "022"
addtask do_image after do_rootfs before do_build
+fakeroot python do_image_complete () {
+ from oe.utils import execute_pre_post_process
+
+ post_process_cmds = d.getVar("IMAGE_POSTPROCESS_COMMAND", True)
+
+ execute_pre_post_process(d, post_process_cmds)
+}
+do_image_complete[dirs] = "${TOPDIR}"
+do_image_complete[umask] = "022"
+addtask do_image_complete after do_image before do_build
+
+
MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|${sysconfdir}|${nonarch_base_libdir}/udev|/lib/modules/[^/]*/modules.*|"
MULTILIB_CHECK_FILE = "${WORKDIR}/multilib_check.py"
MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib"