我无法理解bitbake食谱。 (我有一些写得不好我需要修改,我通常会阅读并理解整个机制,但遗憾的是我的时间紧迫)。 能帮我理解RDEPENDS和DEPENDS之间的区别吗?我阅读了参考资料,我知道它们分别代表运行时依赖性和构建依赖性,但是在bitbake配方中对它的影响是什么? 据我所知,如果包A依赖于另一个B,则必须构建B并准备好启用A来构建。 Bitbake与运行时无关,它只用于构建和部署包。那有什么区别?
答案 0 :(得分:29)
As you say, bitbake is concerned with building and deploying the packages, and it needs to deploy all the packages that are needed to satisfy runtime dependencies on the target system.
If your recipe says that target T DEPENDS
on a target P, that tells
bitbake that it must build P before T, because T can't be
built without P.
If your recipe says that T RDEPENDS
on P, that tells
bitbake that it must deploy P to the target system if it
deploys T, because T can't be used without P.
For example, you can't build tar
without the C compiler, but
you don't need the C compiler to use tar
. You can deploy tar
without deploying the C compiler. So that's a DEPEND
.
On the other hand, you can't use tar
without the runtime C library.
If tar
is deployed, the runtime C library must also be deployed.
So that's an RDEPEND
.
The bitake technicalities are:
If T DEPENDS
on P then T's do_configure
task is made to depend
on P's do_populate_sysroot
task.
If T RDEPENDS
on P then T's do_build
task ia made to depend on P's
do_package_write
task.