sanity: fix NameError when upgrading a TMPDIR from ABI 14
PATCH 1/1 sanity: fix NameError when upgrading a TMPDIR from ABI 14
drop_v14_cross_builds() calls sstate_clean_manifest(), which is defined in sstate.bbclass. Since the sanity code moved to lib/oe in 4efa61f049 ("sanity: Move code to lib/oe"), that name is no longer in scope, so a TMPDIR with ABI 14 fails with:
NameError: name 'sstate_clean_manifest' is not defined
Call it through bb.utils.exec_flat_python_func().
AI-Generated: Uses Claude
--- meta/lib/oe/sanity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/sanity.py +1 -1
@@ -474,7 +474,7 @@ def drop_v14_cross_builds(d): for m in glob.glob(manifest + ".*"): if m.endswith(".postrm"): continue - sstate_clean_manifest(m, d) + bb.utils.exec_flat_python_func("sstate_clean_manifest", m, d) bb.utils.remove(stamp + "*") bb.utils.remove(workdir, recurse = True)
Signature · 1 line
2.34.1
Quoted 5 lines · prasanth via openembedded-core
drop_v14_cross_builds()callssstate_clean_manifest(), which is defined in sstate.bbclass. Since the sanity code moved to lib/oe in4efa61f049("sanity: Move code to lib/oe"), that name is no longer in scope, so a TMPDIR with ABI 14 fails with:
Whilst I agree that upgrading from ABI 14 shouldn’t cause an error, 15 was introduced in kirkstone so you’re presumably trying to use a build tree that previously was used to build gatesgarth/hardknott/honister?
meta/lib/oe/sanity.py def drop_v14_cross_builds(d): · line 477
Quoted 2 lines
meta/lib/oe/sanity.py +1
-1- sstate_clean_manifest(m, d) + bb.utils.exec_flat_python_func("sstate_clean_manifest", m, d)
Why exec_flat_python_func? Literally nothing has used this function since 2016, I’ll send a patch to remove it.
Ross
Hi Ross,
I saw your commit, fair point.
As ABI 14 trees are honister or older, would it be better to drop the 14 -> 15 conversion instead? Those trees would then get the normal layout-change message rather than a traceback. I can send a v2.
Thanks,
Prasanth
Quoted 22 lines · Ross Burton
Quoted 5 lines · prasanth via openembedded-core
drop_v14_cross_builds()callssstate_clean_manifest(), which is defined in sstate.bbclass. Since the sanity code moved to lib/oe in4efa61f049("sanity: Move code to lib/oe"), that name is no longer in scope, so a TMPDIR with ABI 14 fails with:Whilst I agree that upgrading from ABI 14 shouldn’t cause an error, 15 was introduced in kirkstone so you’re presumably trying to use a build tree that previously was used to build gatesgarth/hardknott/honister?
Review
Quoted 2 lines
(quoted diff) +1
-1- sstate_clean_manifest(m, d) +
bb.utils.exec_flat_python_func("sstate_clean_manifest", m, d)Why
exec_flat_python_func? Literally nothing has used this function since 2016, I’ll send a patch to remove it.Ross