diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-01-13 17:55:52 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-01-14 10:31:02 +0000 |
commit | f833cc54a672eae6f96ff4b77fa951705896cd8e (patch) | |
tree | c733f15bd23f04d2b25f5b5da2cab5500b7fab38 | |
parent | 2223215a966fc18ffe16383a804f6d90efaaf80f (diff) | |
download | poky-f833cc54a672eae6f96ff4b77fa951705896cd8e.tar.gz |
base: Add virtual/cc recipe specific control handling
(From OE-Core rev: 52805f522bb01504eb87ef93030c3328132070d4)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes-global/base.bbclass | 14 | ||||
-rw-r--r-- | meta/conf/distro/include/default-providers.inc | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass index 06a7102af3..86456dbac0 100644 --- a/meta/classes-global/base.bbclass +++ b/meta/classes-global/base.bbclass | |||
@@ -542,6 +542,20 @@ python () { | |||
542 | d.setVarFlag('do_devshell', 'fakeroot', '1') | 542 | d.setVarFlag('do_devshell', 'fakeroot', '1') |
543 | d.appendVarFlag('do_devshell', 'depends', ' virtual/fakeroot-native:do_populate_sysroot') | 543 | d.appendVarFlag('do_devshell', 'depends', ' virtual/fakeroot-native:do_populate_sysroot') |
544 | 544 | ||
545 | # Handle recipe level PREFERRED_PROVIDERs | ||
546 | depends = (d.getVar("DEPENDS") or "").split() | ||
547 | virtprovs = (d.getVar("RECIPE_VIRTUAL_PROVIDERS") or "").split() | ||
548 | newdeps = [] | ||
549 | for dep in depends: | ||
550 | if dep in virtprovs: | ||
551 | newdep = d.getVar("PREFERRED_PROVIDER_" + dep) | ||
552 | if not newdep: | ||
553 | bb.fatal("Error, recipe virtual provider PREFERRED_PROVIDER_%s not set" % dep) | ||
554 | newdeps.append(newdep) | ||
555 | else: | ||
556 | newdeps.append(dep) | ||
557 | d.setVar("DEPENDS", " ".join(newdeps)) | ||
558 | |||
545 | need_machine = d.getVar('COMPATIBLE_MACHINE') | 559 | need_machine = d.getVar('COMPATIBLE_MACHINE') |
546 | if need_machine and not bb.utils.to_boolean(d.getVar('PARSE_ALL_RECIPES', False)): | 560 | if need_machine and not bb.utils.to_boolean(d.getVar('PARSE_ALL_RECIPES', False)): |
547 | import re | 561 | import re |
diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc index 506d77811f..fd1797b24f 100644 --- a/meta/conf/distro/include/default-providers.inc +++ b/meta/conf/distro/include/default-providers.inc | |||
@@ -1,6 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Default virtual providers | 2 | # Default virtual providers |
3 | # | 3 | # |
4 | RECIPE_VIRTUAL_PROVIDERS = "virtual/cc" | ||
4 | PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" | 5 | PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" |
5 | PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xorg" | 6 | PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xorg" |
6 | PREFERRED_PROVIDER_virtual/egl ?= "mesa" | 7 | PREFERRED_PROVIDER_virtual/egl ?= "mesa" |