From: Martin Jansa <[email protected]>

* it was introduced in:
  
https://git.yoctoproject.org/meta-virtualization/commit/?id=a940a0e873f9163d4585555b3f3d38e99400d237
  but it doesn't work well when PREFERRED_VERSION is set to e.g. "6.6.%",
  you remove the '%' but not the trailing dot, causing:

  ERROR: Nothing PROVIDES 'yocto-cfg-fragments-6.6.-native'. Close matches:
    yocto-cfg-fragments-6.10-native
    yocto-cfg-fragments-6.6
    yocto-cfg-fragments-6.6-native
---
 recipes-kernel/linux/linux-yocto_virtualization.inc | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/recipes-kernel/linux/linux-yocto_virtualization.inc 
b/recipes-kernel/linux/linux-yocto_virtualization.inc
index 88a1fa99..e729c3b2 100644
--- a/recipes-kernel/linux/linux-yocto_virtualization.inc
+++ b/recipes-kernel/linux/linux-yocto_virtualization.inc
@@ -34,14 +34,9 @@ def distro_cond_feature(feature_fragment,distro_feature,d):
     return bb.utils.contains('DISTRO_FEATURES', distro_feature, ' ' + feat, ' 
', d)
 
 def kernel_meta_ver_depends(d):
-    import re
-
-    t = d.getVar("PREFERRED_PROVIDER_virtual/kernel")
-    pv = d.getVar( "PREFERRED_VERSION_%s" % t )
-    pv = re.sub( '%', '', pv )
-
     yocto_enabled = bb.data.inherits_class('kernel-yocto', d)
     if yocto_enabled:
+        pv = oe.utils.trim_version(d.getVar('PV'), 2)
         return "yocto-cfg-fragments-%s-native:do_populate_sysroot" % pv
     else:
         return ""
-- 
2.46.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#8863): 
https://lists.yoctoproject.org/g/meta-virtualization/message/8863
Mute This Topic: https://lists.yoctoproject.org/mt/108024232/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to