If you want to set VERSION_CODENAME to empty you can just add:
DISTRO_CODENAME ??= ""
to make sure it's always expanded to at least empty string.

On Thu, Jun 20, 2024 at 3:04 PM Daniel Semkowicz via
lists.openembedded.org <[email protected]>
wrote:
>
> If DISTRO_CODENAME was not set, VERSION_CODENAME field was populated
> with unparsed string. This resulted in the following line in os-release
> file:
>
>   VERSION_CODENAME="${DISTRO_CODENAME}"
>
> According to systemd documentation, this field is optional.
> Fix the problem by setting VERSION_CODENAME conditionally, only if
> DISTRO_CODENAME was set.
>
> Signed-off-by: Daniel Semkowicz <[email protected]>
> ---
>  meta/recipes-core/os-release/os-release.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/os-release/os-release.bb 
> b/meta/recipes-core/os-release/os-release.bb
> index 8906906bc3..93af08c182 100644
> --- a/meta/recipes-core/os-release/os-release.bb
> +++ b/meta/recipes-core/os-release/os-release.bb
> @@ -24,7 +24,7 @@ ID = "${DISTRO}"
>  NAME = "${DISTRO_NAME}"
>  VERSION = "${DISTRO_VERSION}${@' (%s)' % DISTRO_CODENAME if 
> 'DISTRO_CODENAME' in d else ''}"
>  VERSION_ID = "${DISTRO_VERSION}"
> -VERSION_CODENAME = "${DISTRO_CODENAME}"
> +VERSION_CODENAME = "${@d.getVar('DISTRO_CODENAME') or ''}"
>  PRETTY_NAME = "${DISTRO_NAME} ${VERSION}"
>
>  # The vendor field is hardcoded to "openembedded" deliberately. We'd
> --
> 2.45.2
>
>
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#200953): 
https://lists.openembedded.org/g/openembedded-core/message/200953
Mute This Topic: https://lists.openembedded.org/mt/106779331/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to