From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: peter.marko@siemens.com, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] testimage: get real os-release file
Date: Mon, 12 May 2025 23:21:28 +0100 [thread overview]
Message-ID: <18b89e1c8bbd57336060148b6d96ce809295c98b.camel@linuxfoundation.org> (raw)
In-Reply-To: <20250512155835.9159-1-peter.marko@siemens.com>
On Mon, 2025-05-12 at 17:58 +0200, Peter Marko via lists.openembedded.org wrote:
> From: Peter Marko <peter.marko@siemens.com>
>
> /etc/os-release is a symlink to /usr/lib.
> Symlink is retrieved as a dead link which points to nowhere if also the
> original file is not accompanying it.
> Fetch the real file instead of this link.
>
> Alternative could be to use "tar -h" (supported also by busybox tar),
> however that could lose some important information if links are relevant
> for failure analysis.
>
> Signed-off-by: Peter Marko <peter.marko@siemens.com>
> ---
> meta/classes-recipe/testimage.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass
> index e090b1ef4b..862f3e53a3 100644
> --- a/meta/classes-recipe/testimage.bbclass
> +++ b/meta/classes-recipe/testimage.bbclass
> @@ -26,7 +26,7 @@ TESTIMAGE_FAILED_QA_ARTIFACTS = "\
> ${localstatedir}/log \
> ${localstatedir}/volatile/log \
> ${sysconfdir}/version \
> - ${sysconfdir}/os-release"
> + ${nonarch_libdir}/os-release"
>
> # If some ptests are run and fail, retrieve corresponding directories
> TESTIMAGE_FAILED_QA_ARTIFACTS += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${libdir}/*/ptest', '', d)}"
The definitive location for this is ${sysconfdir} as far as I know and
I'm nervous about replacing that. We could list both? For this file,
resolving the symlink is the right thing to do but that might not be
the case for all files listed in the variable which does make this
trickier to solve...
Cheers,
RIchard
next prev parent reply other threads:[~2025-05-12 22:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 15:58 [PATCH] testimage: get real os-release file Peter Marko
2025-05-12 22:21 ` Richard Purdie [this message]
2025-05-13 7:41 ` [OE-core] " Marko, Peter
2025-05-13 7:41 ` [OE-core][PATCH v2] " Peter Marko
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=18b89e1c8bbd57336060148b6d96ce809295c98b.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=peter.marko@siemens.com \
/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