I have a trouble of understanding the FILES_${PN}
even after I have read the manual. For example, I was working on this example of making startup script. After I wrote something similar to, I got these error messages.
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'
And as I understood, that the files I provided with recipe to be installed on the Image is not packaged within a certain package so Yocto cannot know where to unpack them, am I correct?
So, I have added FILES_${PN} += " with all directory paths "
which I install recipe files, then it worked fine.
So, could you explain to me why I need to do this? and when? a coherent example will be helpful if it is provided.