mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
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>
This commit is contained in:
@@ -251,14 +251,35 @@ addtask rootfs before do_build
|
|||||||
|
|
||||||
fakeroot python do_image () {
|
fakeroot python do_image () {
|
||||||
from oe.image import create_image
|
from oe.image import create_image
|
||||||
|
from oe.image import Image
|
||||||
|
from oe.utils import execute_pre_post_process
|
||||||
|
|
||||||
# generate final images
|
i = Image(d)
|
||||||
create_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[dirs] = "${TOPDIR}"
|
||||||
do_image[umask] = "022"
|
do_image[umask] = "022"
|
||||||
addtask do_image after do_rootfs before do_build
|
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.*|"
|
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_CHECK_FILE = "${WORKDIR}/multilib_check.py"
|
||||||
MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib"
|
MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib"
|
||||||
|
|||||||
@@ -351,12 +351,6 @@ class Image(ImageDepGraph):
|
|||||||
|
|
||||||
def create(self):
|
def create(self):
|
||||||
bb.note("###### Generate images #######")
|
bb.note("###### Generate images #######")
|
||||||
pre_process_cmds = self.d.getVar("IMAGE_PREPROCESS_COMMAND", True)
|
|
||||||
post_process_cmds = self.d.getVar("IMAGE_POSTPROCESS_COMMAND", True)
|
|
||||||
|
|
||||||
execute_pre_post_process(self.d, pre_process_cmds)
|
|
||||||
|
|
||||||
self._remove_old_symlinks()
|
|
||||||
|
|
||||||
image_cmd_groups = self._get_imagecmds()
|
image_cmd_groups = self._get_imagecmds()
|
||||||
|
|
||||||
@@ -406,9 +400,6 @@ class Image(ImageDepGraph):
|
|||||||
bb.note("Creating symlinks for %s image ..." % image_type)
|
bb.note("Creating symlinks for %s image ..." % image_type)
|
||||||
self._create_symlinks(subimages)
|
self._create_symlinks(subimages)
|
||||||
|
|
||||||
execute_pre_post_process(self.d, post_process_cmds)
|
|
||||||
|
|
||||||
|
|
||||||
def create_image(d):
|
def create_image(d):
|
||||||
Image(d).create()
|
Image(d).create()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user