Skip to contentSkip to conversation

python-native: Fix parsing with default RPROVIDES dropped in oe-core

PATCH New Martin Jansa 1 participant 1 message Jan 31, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python-native: Fix parsing with default RPROVIDES dropped in oe-core

* adapt to:
https://git.openembedded.org/openembedded-core/commit/?id=b8bbc1bbe282cce2ea4d0ff293f931f6caf6153b
* fixes:
ERROR: meta-python2/recipes-devtools/python/python-native_2.7.18.bb: Error executing a python function in <code>: | ETA: 0:00:32

The stack trace of python calls that resulted in this exception/failure was:
File: '<code>', lineno: 13, function: <module>

     0009:__anon_35__oe_core_meta_classes_devshell_bbclass(d)
     0010:__anon_151__oe_core_meta_classes_sstate_bbclass(d)
     0011:__anon_20__oe_core_meta_classes_blacklist_bbclass(d)
     0012:__anon_177__oe_core_meta_classes_siteinfo_bbclass(d)
 *** 0013:__anon_90__meta_python2_recipes_devtools_python_python_native_2_7_18_bb(d)
File: 'meta-python2/recipes-devtools/python/python-native_2.7.18.bb', lineno: 76, function: __anon_90__meta_python2_recipes_devtools_python_python_native_2_7_18_bb
     0072:        manifest_file.seek(json_start)
     0073:        manifest_str = manifest_file.read()
     0074:        python_manifest = json.loads(manifest_str)
     0075:
 *** 0076:    rprovides = d.getVar('RPROVIDES').split()
     0077:
     0078:    # Hardcoded since it cant be python-native-foo, should be python-foo-native
     0079:    pn = 'python'
     0080:

Exception: AttributeError: 'NoneType' object has no attribute 'split'

---
 recipes-devtools/python/python-native_2.7.18.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-devtools/python/python-native_2.7.18.bb +1 -1
index 72aa34c..5b29c9f 100644
@@ -73,7 +73,7 @@ python(){
         manifest_str = manifest_file.read()
         python_manifest = json.loads(manifest_str)
 
-    rprovides = d.getVar('RPROVIDES').split()
+    rprovides = (d.getVar('RPROVIDES') or "").split()
 
     # Hardcoded since it cant be python-native-foo, should be python-foo-native
     pn = 'python'
Signature · 1 line
2.27.0