Bug 13140

Summary: data_smart.py fails when parsing ”${@<call>}”
Product: [Build System, Metadata & Runtime] BitBake Reporter: Ulf Samuelsson <Ulf>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: poky.bs.watcher, poky.watcher, Ulf
Version: unspecified   
Target Milestone: 3.4   
Hardware: Other   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ulf Samuelsson 2019-01-14 18:22:37 UTC
When defining a new image class we ran into this problem.

do_sdk_depends[depends] = ”${@get_ext_sdk_depends(d) ...”

When parsed in data_smart.py  DataSmart.expandsWithRefs test for the presence of ”${”, and if found, it tries to expand the variable, but due to the presence of the ’@’, the regular expression does not find a match, and somewhere an exception is triggered causing the build to abort.

The problem was seen on the sumo branch.
Comment 1 Ulf Samuelsson 2019-01-15 06:17:51 UTC
I tried checking for the get_ext_sdk_depends string, and replacing it to a call to the function, which is not visible inside data_smart.py.
Then tried just removing it, which exposed a circular dependency, which was not present in the pyro branch.

Will compare the dependencies with those of a build without our image class to find out how to resolve the circular dependency.
Comment 2 Richard Purdie 2019-01-17 15:35:40 UTC
There is information on the yocto mailing list about this, its a circular task dependency problem. We need to see if we can improve the error message in such cases.
Comment 3 Ulf Samuelsson 2019-01-17 22:26:54 UTC
I sent a patch which will compare the after and before task list and check them vs a list of tasks where we know the order.
If a combination is found which would cause a circular dependency, an error is emitted.
It will not cover every circular error, but it should be quick, and catch a significant number of errors.
Comment 5 Richard Purdie 2021-09-10 14:10:04 UTC
Patch sent to make the circular task errors fatal with a sensible error message