Hi @luciolis and @RudolfStreif,
I was able to detect the problem here on my side. Let me show you how to solve it for now and then let me know if you guys have any questions about it.
The copy_data
function was replaced in the openembedded layer:
commit 06e088ef6e961f05ca600612adcc71bff91f09be
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Fri Nov 11 22:58:27 2022 +0000
sanity: Drop data finalize call
This call was effectively like update_data and no longer did anything
in bitbake. Drop it as it is obsolete.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit d3eb4531aae28a07cb7e52ed5fe1102445d2effd)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index f2b2e4dfaf..293e405f62 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -999,13 +999,6 @@ def check_sanity(sanity_data):
if status.messages != "":
raise_sanity_error(sanity_data.expand(status.messages), sanity_data, status.network_error)
-# Create a copy of the datastore and finalise it to ensure appends and
-# overrides are set - the datastore has yet to be finalised at ConfigParsed
-def copy_data(e):
- sanity_data = bb.data.createCopy(e.data)
- sanity_data.finalize()
- return sanity_data
-
addhandler config_reparse_eventhandler
config_reparse_eventhandler[eventmask] = "bb.event.ConfigParsed"
python config_reparse_eventhandler() {
@@ -1016,13 +1009,13 @@ addhandler check_sanity_eventhandler
check_sanity_eventhandler[eventmask] = "bb.event.SanityCheck bb.event.NetworkTest"
python check_sanity_eventhandler() {
if bb.event.getName(e) == "SanityCheck":
- sanity_data = copy_data(e)
+ sanity_data = bb.data.createCopy(e.data)
check_sanity(sanity_data)
if e.generateevents:
sanity_data.setVar("SANITY_USE_EVENTS", "1")
bb.event.fire(bb.event.SanityCheckPassed(), e.data)
elif bb.event.getName(e) == "NetworkTest":
- sanity_data = copy_data(e)
+ sanity_data = bb.data.createCopy(e.data)
if e.generateevents:
sanity_data.setVar("SANITY_USE_EVENTS", "1")
bb.event.fire(bb.event.NetworkTestFailed() if check_connectivity(sanity_data) else bb.event.NetworkTestPassed(), e.data)
This was also fixed on the meta-toradex-bsp-common:
commit 24c7c028fdeedfc4b5e1b21ce4951a82dbfc2667
Author: Max Krummenacher <max.krummenacher@toradex.com>
Date: Thu Nov 17 15:35:14 2022 +0100
toradex-sanity.bbclass: follow upstream change
openembedded-core commit d3eb4531aa ("sanity: Drop data finalize call")
dropped a python function. Replace it with its aquivalent.
Fixes:
| ERROR: Execution of event handler 'defaulttoradex_check_sanity_eventhandler' failed
| Traceback (most recent call last):
| File ".../meta-toradex-bsp-common/classes/toradex-sanity.bbclass", line 57, in defaulttoradex_check_sanity_eventhandler(e=<bb.event.SanityCheck object at 0x7f50de8bb3c8>):
| if bb.event.getName(e) == "SanityCheck":
| > sanity_data = copy_data(e)
| if e.generateevents:
| NameError: name 'copy_data' is not defined
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
(cherry picked from commit 706a6f65b6dfc01f18fca1161498467cafa47822)
openembedded-core backported commit d3eb4531aa to kirkstone
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
diff --git a/classes/toradex-sanity.bbclass b/classes/toradex-sanity.bbclass
index 19a38cd..bfb95f3 100644
--- a/classes/toradex-sanity.bbclass
+++ b/classes/toradex-sanity.bbclass
@@ -54,7 +54,7 @@ toradex_check_sanity_eventhandler[eventmask] = "bb.event.SanityCheck"
python toradex_check_sanity_eventhandler() {
if bb.event.getName(e) == "SanityCheck":
- sanity_data = copy_data(e)
+ sanity_data = bb.data.createCopy(e.data)
if e.generateevents:
sanity_data.setVar("SANITY_USE_EVENTS", "1")
reparse = toradex_check_sanity(sanity_data)
However, since 6.1 is still in development, the manifest wasn’t updated yet and it will be on the next quarterly release:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote alias="repo" fetch="https://git.toradex.com" name="tdx"/>
<project name="meta-toradex-bsp-common.git" path="layers/meta-toradex-bsp-common" remote="tdx" revision="33b78f3508d5170a63e407a9216182026b5ebe08" upstream="kirkstone-6.x.y"/>
<project name="meta-toradex-nxp.git" path="layers/meta-toradex-nxp" remote="tdx" revision="a23c4b6d01831d45634d4156b513746dda051161" upstream="kirkstone-6.x.y"/>
</manifest>
As you can see, the manifest gets one commit behind where the issue was solved. So there is a couple of options to fix this issue:
- First, stick with the 6.0.0 quarterly release. This will roll back the openembedded layer where the copy_data is still used. For that, you can use:
$ repo init -u git://git.toradex.com/toradex-manifest.git -b refs/tags/6.0.0 -m tdxref/default.xml
This is the recommended option since 6.1 is still under development.
-
If you still want to use the 6.1 you can simply manually edit the revision inside manifests/bsp/pinned-tdx.xml
and change the revision from 33b78f3508d5170a63e407a9216182026b5ebe08 to 24c7c028fdeedfc4b5e1b21ce4951a82dbfc2667, where the issue is resolved.
-
Or you can also go to the meta-toradex-bsp-common
folder which was downloaded by repo
and checkout to 24c7c028fdeedfc4b5e1b21ce4951a82dbfc2667.
I hope this helps, let me know if you have any questions.
Best Regards,
Hiago.