summaryrefslogtreecommitdiff
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-06 22:57:34 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-11 15:54:34 +0000
commit57578d0ca6c3aaf6edf0af2c4862d43c97415156 (patch)
tree7762ddf85fd70b342d26f0c4c00870ac958aa7b0 /meta/classes/image.bbclass
parent38237b7ac53c416f85c4a70a61acafc3404c8b5f (diff)
downloadopenembedded-core-57578d0ca6c3aaf6edf0af2c4862d43c97415156.tar.gz
openembedded-core-57578d0ca6c3aaf6edf0af2c4862d43c97415156.tar.bz2
openembedded-core-57578d0ca6c3aaf6edf0af2c4862d43c97415156.zip
image.bbclass: Separate out image generation into a new task, do_image
I've heard complaints from people trying to create more interesting image types about how hard it is to understand the rootfs/image generation code and that its a pain to develop/test/debug. Having looked at it myself, the internal construction of shell functions which then gets passed into a multiprocessing pool is rather convoluted and it places rather odd constraints on when variables are expanded. Its therefore no wonder people find it confusing/complex. This patch starts the process of splitting this up by separating out image generation from the do_rootfs task into a new do_image task. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r--meta/classes/image.bbclass14
1 files changed, 10 insertions, 4 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index e3769b4725..5aca9c48d6 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -207,7 +207,6 @@ PACKAGE_EXCLUDE[type] = "list"
fakeroot python do_rootfs () {
from oe.rootfs import create_rootfs
- from oe.image import create_image
from oe.manifest import create_manifest
# Handle package exclusions
@@ -244,15 +243,22 @@ fakeroot python do_rootfs () {
# Generate rootfs
create_rootfs(d)
-
- # generate final images
- create_image(d)
}
do_rootfs[dirs] = "${TOPDIR}"
do_rootfs[cleandirs] += "${S}"
do_rootfs[umask] = "022"
addtask rootfs before do_build
+fakeroot python do_image () {
+ from oe.image import create_image
+
+ # generate final images
+ create_image(d)
+}
+do_image[dirs] = "${TOPDIR}"
+do_image[umask] = "022"
+addtask do_image after do_rootfs 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"