![](/img/trans.png)
[英]Yocto error: Building libreoffice package fails in do_package task
[英]How to add a custom bitbake task at the end of task list in yocto? I want the custom task to run as the last task while building the image
我想在 bitbake 中添加一个任务,该任务应该在任务之后而不是在任何任务之前运行。 换句话说,我希望自定义任务在构建图像时作为最后一个任务运行。
例子:
我有两个名为 do_task_A() 和 do_task_B() 的任务。 现在,我希望 do_task_B() 在 do_task_A() 之后执行。
do_task_A() {
..........
..........
..........
}
addtask task_A
do_task_B() {
..........
..........
..........
}
addtask task_B after do_task_A
上面的代码片段确保 task_B 如果执行,则在 task_A 之后执行。 但是它不保证 task_B 的执行。
这个要求是 do_task_B() 必须在构建镜像时作为最后一个任务运行。
我已经尝试过的事情:
上述方法(1-3)因循环依赖而失败
上述方法(4-6)失败并出现异常:IndexError:列表索引超出范围
有没有什么办法可以在构建镜像的时候强行运行task_B? 我希望 do_task_B() 默认执行,而不是使用 bitbake -c <task_name> <image_name>
build 是最后的任务,所以你必须设置:
addtask do_task_A after do_deploy before do_build
addtask do_task_B after do_task_A before do_build
也许你可以看看这里: How can I add a task after do_deploy()?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.