On Thursday, February 6, 2020 at 10:51:22 PM UTC+5:30, Jan Kiszka wrote:On 06.02.20 15:06, Vijai Kumar K wrote:
> Sometimes the additional postprocessing functions we add as
> part our custom image needs a proper chroot environment.
When exactly?
Though not finalized, the base-apt source gathering which I proposed to do via rootfs postprocess.
That is the only one right now. But I believe more similar might come. We already
have some post-process in our QA layer to pull out the dpkg status file for processing.
But that doesn't need chroot.
>
> Implicitly make rootfs_postprocess_finalize as the last step
> to be executed in rootfs_postprocess task.
>
Well, that relies on no one else using _append to add things. Otherwise,
the race is open again...
Yes. Also to note, there was this proposal from Baurzhan[1] to remove finalize from rootfs features.
We could do something similar if no one actually uses that feature explicitly. But, though not tested,
I believe that might break buildchroot, and we might need to take care of it in buildchroot's post-process.
If everyone agrees then we could take that path. That should be cleaner and should avoid these kinds of
easy to make errs.
[1] https://groups.google.com/d/msg/isar-users/_RLBzyvvZvM/WuYpLPVBAQAJ
Thanks,
Vijai Kumar K
Jan
> Signed-off-by: Vijai Kumar K <Vijaikumar_...@mentor.com>
> ---
> meta/classes/rootfs.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
> index 64eaef7..b0394d5 100644
> --- a/meta/classes/rootfs.bbclass
> +++ b/meta/classes/rootfs.bbclass
> @@ -197,7 +197,7 @@ rootfs_generate_manifest () {
> ${ROOTFS_MANIFEST_DEPLOY_DIR}/"${PF}".manifest
> }
>
> -ROOTFS_POSTPROCESS_COMMAND += "${@bb.utils.contains('ROOTFS_FEATURES', 'finalize-rootfs', 'rootfs_postprocess_finalize', '', d)}"
> +ROOTFS_POSTPROCESS_COMMAND_append = "${@bb.utils.contains('ROOTFS_FEATURES', 'finalize-rootfs', ' rootfs_postprocess_finalize', '', d)}"
> rootfs_postprocess_finalize() {
> sudo -s <<'EOSUDO'
> test -e "${ROOTFSDIR}/chroot-setup.sh" && \
>
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux