-
Notifications
You must be signed in to change notification settings - Fork 913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
phosphor-dbus-interfaces: dependency issue with do_write_config task #4012
Comments
Sounds good. Are you able to contribute the fix via Gerrit? |
After thinking about it, a better solution would be to make the changes of 'meson_options.txt' file in the 'do_configure' task. Because, the 'do_write_config' task is a task created by the meson class and is only used to create files for the meson build. In our case we want to modify a configuration file using a file from the sources, which corresponds to the 'do_configure' task. And this way we don't modify any task dependencies. Proposed Solution # Remove all schemas by default regardless of the meson_options.txt config
-do_write_config:append() {
+do_configure:prepend() {
for intf in $(grep "^option('data_" ${S}/meson_options.txt | sed "s,^.*\(data_[^']*\).*$,\1,"); do
sed -i "/^\[built-in options\]\$/a$intf = false" ${WORKDIR}/meson.cross
done
}
-do_write_config[deptask] += "do_unpack" |
I have never contributed via Gerrit to OpenBMC before. |
Problem
There is a dependency issue in phosphor-dbus-interfaces recipe concerning the 'do_write_config' task.
The 'do_write_config' task forces all of the YAML subdirectory options to 'false' using the list in the 'meson_options.txt'. For this function to run correctly, the 'meson_options.txt' file must be present.
The 'log.task_order' has not the correct order:
An error is present in the logs of the task 'do_write_config' because the file 'meson_options.txt' is not present:
Explanation
The current dependency configuration uses 'deptask' to add a dependency on the 'do_unpack' task for 'do_write_config':
do_write_config[deptask] += "do_unpack"
However, 'deptask' is not the right flag.
Definition of the 'deptask' flag according to the 'docs.yocto project.org' documentation:
'The [deptask] varflag for tasks signifies the task of each item listed in DEPENDS that must complete before that task can be executed.'
In our case, we want to wait until the 'do_unpack' task of our recipe is finished and not the 'do_unpack' tasks of the 'DEPENDS'.
It would be better to use the 'depends' flag.
Also, it would be better to wait until the 'do_patch' task is finished to execute the 'do_write_config' task, because a patch can modify the 'meson_options.txt' file.
Proposed Solution
Use this dependency:
do_write_config[depends] += " ${PN}:do_patch"
The 'log.task_order' has the correct order:
No errors are present in the logs of the task 'do_write_config':
Additional context
Commit that introduces the dependency on the 'do_write_config' task: d5ed092
The text was updated successfully, but these errors were encountered: