diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-06 22:57:34 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-11 23:26:29 +0000 |
commit | cdc0aeed9b17387ea37dcbfef7d474cce372e8db (patch) | |
tree | c06d67066cfd6a8538fba85cff5006bd93470f27 /meta/classes/image.bbclass | |
parent | 0269219fbebd4e92b9505b3d76d593dbf4e2c539 (diff) | |
download | poky-cdc0aeed9b17387ea37dcbfef7d474cce372e8db.tar.gz |
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.
(From OE-Core rev: 57578d0ca6c3aaf6edf0af2c4862d43c97415156)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r-- | meta/classes/image.bbclass | 14 |
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" | |||
207 | 207 | ||
208 | fakeroot python do_rootfs () { | 208 | fakeroot python do_rootfs () { |
209 | from oe.rootfs import create_rootfs | 209 | from oe.rootfs import create_rootfs |
210 | from oe.image import create_image | ||
211 | from oe.manifest import create_manifest | 210 | from oe.manifest import create_manifest |
212 | 211 | ||
213 | # Handle package exclusions | 212 | # Handle package exclusions |
@@ -244,15 +243,22 @@ fakeroot python do_rootfs () { | |||
244 | 243 | ||
245 | # Generate rootfs | 244 | # Generate rootfs |
246 | create_rootfs(d) | 245 | create_rootfs(d) |
247 | |||
248 | # generate final images | ||
249 | create_image(d) | ||
250 | } | 246 | } |
251 | do_rootfs[dirs] = "${TOPDIR}" | 247 | do_rootfs[dirs] = "${TOPDIR}" |
252 | do_rootfs[cleandirs] += "${S}" | 248 | do_rootfs[cleandirs] += "${S}" |
253 | do_rootfs[umask] = "022" | 249 | do_rootfs[umask] = "022" |
254 | addtask rootfs before do_build | 250 | addtask rootfs before do_build |
255 | 251 | ||
252 | fakeroot python do_image () { | ||
253 | from oe.image import create_image | ||
254 | |||
255 | # generate final images | ||
256 | create_image(d) | ||
257 | } | ||
258 | do_image[dirs] = "${TOPDIR}" | ||
259 | do_image[umask] = "022" | ||
260 | addtask do_image after do_rootfs before do_build | ||
261 | |||
256 | MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|${sysconfdir}|${nonarch_base_libdir}/udev|/lib/modules/[^/]*/modules.*|" | 262 | MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|${sysconfdir}|${nonarch_base_libdir}/udev|/lib/modules/[^/]*/modules.*|" |
257 | MULTILIB_CHECK_FILE = "${WORKDIR}/multilib_check.py" | 263 | MULTILIB_CHECK_FILE = "${WORKDIR}/multilib_check.py" |
258 | MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib" | 264 | MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib" |