Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: "Leo Sartre" <leo@missingno.tech>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [meta-oe][PATCH] image_types_sparse: create symlinks for generated sparse images
Date: Tue, 08 Sep 2026 05:05:16 -0700	[thread overview]
Message-ID: <256345.1788869116116111066@lists.openembedded.org> (raw)
In-Reply-To: <20260902161946.13068-1-emailaddress.ashish@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2033 bytes --]

Hello,

On Wed, Sep 2, 2026 at 06:20 PM, Ashish Mishra wrote:

> 
> Ensure that symbolic links (${IMAGE_LINK_NAME}) are created for both
> sparse images, matching standard Yocto image deployment behavior
> 
> Signed-off-by: AshishKumar Mishra <emailaddress.ashish@gmail.com>
> ---
> meta-oe/classes/image_types_sparse.bbclass | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/meta-oe/classes/image_types_sparse.bbclass
> b/meta-oe/classes/image_types_sparse.bbclass
> index 5c1d92bd18..2ee4aa1159 100644
> --- a/meta-oe/classes/image_types_sparse.bbclass
> +++ b/meta-oe/classes/image_types_sparse.bbclass
> @@ -16,11 +16,13 @@ CONVERSION_CMD:sparse = " \
> case '${type}' in \
> ext*) \
> bbnote 'Running e2fsprogs-derived ext2simg_android..' ; \
> - ext2simg_android '${IMAGE_NAME}.${type}' '${IMAGE_NAME}.${type}.simg' ||
> bberror 'ext2simg_android failed' \
> + ext2simg_android '${IMAGE_NAME}.${type}' '${IMAGE_NAME}.${type}.simg' ||
> bberror 'ext2simg_android failed' ;\
> + ln -sf '${IMAGE_NAME}.${type}.simg'
> '${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${type}.simg'; \

Wouldn't it be simpler to use same .sparse extension name for this image too, that way the IMAGE_LINK_NAME symlink is created by oe-core image.bbclass.
It is what I've done in this change: https://lists.openembedded.org/g/openembedded-devel/message/129709 (sorry did not saw this one before submitting mine).

> 
> ;; \
> *) \
> bbnote 'Generating sparse image for non-ext filesystem...'; \
> img2simg -s '${IMAGE_NAME}.${type}' '${IMAGE_NAME}.${type}.sparse'
> ${SPARSE_BLOCK_SIZE}; \
> + ln -sf '${IMAGE_NAME}.${type}.sparse'
> '${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${type}.sparse'; \

I think this is already covered by the oe-core image.bbclass: https://github.com/openembedded/openembedded-core/blob/master/meta/classes-recipe/image.bbclass#L493
So this line is not needed.
> 
> ;; \
> esac; \
> if [ "${DELETE_RAWIMAGE_AFTER_SPARSE_CMD}" = "1" ]; then \
> --
> 2.43.0

Regards

[-- Attachment #2: Type: text/html, Size: 2498 bytes --]

      reply	other threads:[~2026-09-08 12:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02 16:19 [meta-oe][PATCH] image_types_sparse: create symlinks for generated sparse images AshishKumar Mishra
2026-09-08 12:05 ` Leo Sartre [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=256345.1788869116116111066@lists.openembedded.org \
    --to=leo@missingno.tech \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox