summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <martin2.jansa@lgepartner.com>2024-08-21 20:03:06 +0200
committerBruce Ashfield <bruce.ashfield@gmail.com>2024-09-03 02:09:16 +0000
commitc02af94731631b3432b8ddee2b89761ab32530ee (patch)
tree538b940fae0cb755b2ce4ad460a4533c9b970d53
parent238020e42060764e7d2aadbb43a12792ed8b7e27 (diff)
downloadmeta-virtualization-c02af94731631b3432b8ddee2b89761ab32530ee.tar.gz
linux-yocto_virtualization.inc: parse MAJOR.MINOR version from PV not PREFERRED_VERSION
* 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 Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-kernel/linux/linux-yocto_virtualization.inc7
1 files changed, 1 insertions, 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):
34 return bb.utils.contains('DISTRO_FEATURES', distro_feature, ' ' + feat, ' ', d) 34 return bb.utils.contains('DISTRO_FEATURES', distro_feature, ' ' + feat, ' ', d)
35 35
36def kernel_meta_ver_depends(d): 36def kernel_meta_ver_depends(d):
37 import re
38
39 t = d.getVar("PREFERRED_PROVIDER_virtual/kernel")
40 pv = d.getVar( "PREFERRED_VERSION_%s" % t )
41 pv = re.sub( '%', '', pv )
42
43 yocto_enabled = bb.data.inherits_class('kernel-yocto', d) 37 yocto_enabled = bb.data.inherits_class('kernel-yocto', d)
44 if yocto_enabled: 38 if yocto_enabled:
39 pv = oe.utils.trim_version(d.getVar('PV'), 2)
45 return "yocto-cfg-fragments-%s-native:do_populate_sysroot" % pv 40 return "yocto-cfg-fragments-%s-native:do_populate_sysroot" % pv
46 else: 41 else:
47 return "" 42 return ""