yocto - yocto使用 FILES_$ {PN}的示例

例如,我正在开发启动脚本的例子,得到了这些错误消息。


ERROR: initscriptd-1.0-r0 do_package: QA Issue: initscriptd: Files/directories were installed but not shipped in any package:


 /usr


 /usr/sbin


Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.


initscriptd: 2 installed and not shipped files. [installed-vs-shipped]


ERROR: initscriptd-1.0-r0 do_package: Fatal QA errors found, failing task.


ERROR: initscriptd-1.0-r0 do_package: Function failed: do_package


ERROR: Logfile of failure stored in: /home/yahia/Desktop/elinux_dev/bake_factory/poky-pyro-17.0.1/build/tmp/work/core2-64-poky-linux/initscriptd/1.0-r0/temp/log.do_package.5252


ERROR: Task (/home/yahia/Desktop/elinux_dev/bake_factory/poky-pyro-17.0.1/meta-mylayer/recipes-core/mylayer-initscript/initscriptd.bb:do_package) failed with exit code '1'



我添加了FILES_$ {PN} = "with all directory paths" ,也安装了recipe文件,然后它工作正常。

谁能告诉我为什么需要这么做?

时间:

recipe 可以(而且通常)生成多个包,系统并不愚蠢,例如所有头文件将自动进入-dev包,所有文档均进入-doc,但是recipe编写者通常需要确定特定文件属于哪个包。FILES_<packagename> +="/path/to/file"格式。

FILES_的默认值可以在meta/conf/bitbake.conf中找到,但是请注意,recipe继承的类还可以修改这些值:检查最终值bitbake -e <recipe>|grep ^FILES_

在例子中,你的项目生成系统创建了一些目录,但是没有放入其中?如果是这样,你可以修改生成系统,添加一个do_install_append ()函数来删除空目录。

...