]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
base/features_check: Make PARSE_ALL_RECIPES and SOURCE_MIRROR_FETCH boolean
authorRobert Yang <liezhi.yang@windriver.com>
Sun, 22 Dec 2024 16:02:37 +0000 (08:02 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 23 Dec 2024 11:41:13 +0000 (11:41 +0000)
So that value "0" can turn them off.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-global/base.bbclass
meta/classes-recipe/features_check.bbclass

index 101ecdcf0f18f201b1c9e2918f0329a7b679325f..c8268abcdf76b737ac4360c7d145b54fc2edddb0 100644 (file)
@@ -330,7 +330,7 @@ python base_eventhandler() {
         # particular.
         #
         pn = d.getVar('PN')
-        source_mirror_fetch = d.getVar('SOURCE_MIRROR_FETCH', False)
+        source_mirror_fetch = bb.utils.to_boolean(d.getVar('SOURCE_MIRROR_FETCH', False))
         if not source_mirror_fetch:
             provs = (d.getVar("PROVIDES") or "").split()
             multiprovidersallowed = (d.getVar("BB_MULTI_PROVIDER_ALLOWED") or "").split()
@@ -553,7 +553,7 @@ python () {
         d.appendVarFlag('do_devshell', 'depends', ' virtual/fakeroot-native:do_populate_sysroot')
 
     need_machine = d.getVar('COMPATIBLE_MACHINE')
-    if need_machine and not d.getVar('PARSE_ALL_RECIPES', False):
+    if need_machine and not bb.utils.to_boolean(d.getVar('PARSE_ALL_RECIPES', False)):
         import re
         compat_machines = (d.getVar('MACHINEOVERRIDES') or "").split(":")
         for m in compat_machines:
@@ -562,7 +562,8 @@ python () {
         else:
             raise bb.parse.SkipRecipe("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % d.getVar('MACHINE'))
 
-    source_mirror_fetch = d.getVar('SOURCE_MIRROR_FETCH', False) or d.getVar('PARSE_ALL_RECIPES', False)
+    source_mirror_fetch = bb.utils.to_boolean(d.getVar('SOURCE_MIRROR_FETCH', False)) or \
+            bb.utils.to_boolean(d.getVar('PARSE_ALL_RECIPES', False))
     if not source_mirror_fetch:
         need_host = d.getVar('COMPATIBLE_HOST')
         if need_host:
index 163a7bc3fcc9ecd6a67fb5abe488fc3540a5c7b0..4e122ecaef543c820240f8849cca127ff9fed1e6 100644 (file)
@@ -16,7 +16,7 @@
 
 
 python () {
-    if d.getVar('PARSE_ALL_RECIPES', False):
+    if bb.utils.to_boolean(d.getVar('PARSE_ALL_RECIPES', False)):
         return
 
     unused = True