Re: [meta-virtualization] [PATCH] lasyer.conf/qemu-system-native: Improve native DISTRO_FEATURE handling

Tim Orling <[email protected]> Thu, 23 Apr 2026 21:30:02 -0700
Newsgroups org.yoctoproject.lists.meta-virtualization
Message-ID <CANx9H-B7vsm2BYxgLkY5b9jnj70Xn9L+aLNYwMJ0ixRo3v4t6g@mail.gmail.com>
On Thu, Apr 23, 2026 at 8:55 PM Tim Orling via lists.yoctoproject.org
<[email protected]> wrote:

>
>
> On Thu, Apr 23, 2026 at 6:02 PM Bruce Ashfield via lists.yoctoproject.org
> <[email protected]> wrote:
>
>>
>>
>> On Thu, Apr 23, 2026 at 11:47 AM Richard Purdie via
>> lists.yoctoproject.org <richard.purdie=
>> [email protected]> wrote:
>>
>>> OE-Core needs to make some improvements to the way DISTRO_FEATURES is
>>> being built
>>> but this will break the way meta-virtualization is handling native
>>> propagation.
>>>
>>> Use DISTRO_FEATURES_FILTER_NATIVE which is designed for this.
>>>
>>> That then means updating the bbappend just to look at DISTRO_FEATURES
>>> and to
>>> look for both possible values.
>>>
>>> Signed-off-by: Richard Purdie <[email protected]>
>>> ---
>>>  conf/layer.conf                                     | 2 +-
>>>  recipes-devtools/qemu/qemu-system-native_%.bbappend | 6 +++---
>>>  2 files changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/conf/layer.conf b/conf/layer.conf
>>> index eababe00..2a4a4c91 100644
>>> --- a/conf/layer.conf
>>> +++ b/conf/layer.conf
>>> @@ -72,7 +72,7 @@ HOSTTOOLS_NONFATAL += "getent"
>>>
>>>  # Propagate virtualization/vcontainer to native DISTRO_FEATURES for
>>> qemu virtfs support
>>>  # This enables virtio-9p in qemu-system-native for
>>> container-cross-install batch imports
>>> -DISTRO_FEATURES_NATIVE:append = "
>>> ${@bb.utils.contains_any('DISTRO_FEATURES', 'vcontainer virtualization',
>>> 'virtualization', '', d)}"
>>> +DISTRO_FEATURES_FILTER_NATIVE:append = " vcontainer virtualization"
>>>
>>
>> I'm good to use DISTRO_FEATURES_FILTER_NATIVE, but it was less the
>> mapping of vcontainer -> virtualization I was going for (although I did
>> like the simplicity of just checking one), it was the yocto compat question.
>>
>> Doesn't that change now make it an unconditional update to that variable
>> (and everyone that had meta-virt in their layers now gets those two
>> variables filtered )? Or is by the native of it being distro features there
>> is special handling and it won't cause compatibility issues ?
>>
>> Bruce
>>
>>
> I think we have a related problem with DISTRO_FEATURES_FILTER_NATIVESDK:
> ERROR: Nothing PROVIDES 'nativesdk-libseccomp' (but
> mc:vruntime-aarch64:virtual:nativesdk:/home/pokybuild/yocto-worker/vcontainer-tarball/build/layers/openembedded-core/meta/recipes-support/gnutls/
> gnutls_3.8.12.bb DEPENDS on or otherwise requires it). ...
>
>
Fixed with https://lists.yoctoproject.org/g/meta-virtualization/message/9736
In this case it was DISTRO_FEATURES_DEFAULT => DISTRO_FEATURES_DEFAULTS
that only got uncovered by recent change to filtering.


> --Tim
>
>
>>
>>>
>>>  NON_MULTILIB_RECIPES:append:x86-64 = " kubernetes"
>>>
>>> diff --git a/recipes-devtools/qemu/qemu-system-native_%.bbappend
>>> b/recipes-devtools/qemu/qemu-system-native_%.bbappend
>>> index 1b77db02..e6703c0c 100644
>>> --- a/recipes-devtools/qemu/qemu-system-native_%.bbappend
>>> +++ b/recipes-devtools/qemu/qemu-system-native_%.bbappend
>>> @@ -6,7 +6,7 @@
>>>  # This is required for the fast batch-import path in
>>> container-cross-install.
>>>  #
>>>  # Note: Native recipes don't see target DISTRO_FEATURES directly.
>>> -# The layer.conf propagates virtualization to DISTRO_FEATURES_NATIVE
>>> when
>>> -# vcontainer or virtualization is in the target DISTRO_FEATURES.
>>> +# The layer.conf propagates virtualization and vcontainer to
>>> DISTRO_FEATURES
>>> +# using DISTRO_FEATURES_FILTER_NATIVE.
>>>
>>> -PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES_NATIVE',
>>> 'virtualization', ' virtfs', '', d)}"
>>> +PACKAGECONFIG:append = "${@bb.utils.contains_any('DISTRO_FEATURES',
>>> 'virtualization vcontainer', ' virtfs', '', d)}"
>>>
>>>
>>>
>>>
>>
>> --
>> - Thou shalt not follow the NULL pointer, for chaos and madness await
>> thee at its end
>> - "Use the force Harry" - Gandalf, Star Trek II
>>
>>
>>
>>
>>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#9735):
> https://lists.yoctoproject.org/g/meta-virtualization/message/9735
> Mute This Topic: https://lists.yoctoproject.org/mt/118973947/924729
> Group Owner: [email protected]
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [
> [email protected]]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>