linuxraspberry-piyoctobitbakerecipe

How to solve Yocto Files/directories were installed but not shipped in any package issue


I am using a custom recipe to install packages in my rootfs. My recipe is as follows:

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

DESCRIPTION = "VPU libraries provided by fsl"
SUMMARY = "Copy mksd.sh script to image deployment area"
LICENSE = "CLOSED"

SRC_URI = " \
         file://smf_vpn_config.ovpn \
         file://ifplugd.action \
         file://get_mac.sh \
         file://gen_mac.sh \
         file://IP_SETTINGS.sh \
         file://network_config.sh \
         file://update_network.sh \
         file://check_lte_connection.sh \
         file://check_vpn_connection.sh \
         file://get_ip_address_of_interface.sh \
          "

do_install() {
install -d ${D}/etc/openvpn_config/
install -m 755 ${WORKDIR}/smf_vpn_config.ovpn ${D}/etc/openvpn_config/

install -d ${D}/etc/ifplugd/
install -m 755 ${WORKDIR}/ifplugd.action ${D}/etc/ifplugd/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/get_mac.sh ${D}/usr/bin/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/gen_mac.sh ${D}/usr/bin/

# Install network configuration files
install -d ${D}$/opt/smf/config/net/
install -m 666 ${WORKDIR}/IP_SETTINGS.sh ${D}//opt/smf/config/net/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/network_config.sh ${D}/usr/bin/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/update_network.sh ${D}/usr/bin/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/check_lte_connection.sh ${D}/usr/bin/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/check_vpn_connection.sh ${D}/usr/bin/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/get_ip_address_of_interface.sh ${D}/usr/bin/
}

FILES_${PN} += " \
/etc/openvpn_config/smf_vpn_config.ovpn \
/etc/ifplugd/ifplugd.action \
/usr/bin/get_mac.sh \
/usr/bin/gen_mac.sh \
/opt/* \
"

When I try to build this recipe, I get the following error

ERROR: extra-files-1.0-r0 do_package: QA Issue: extra-files: Files/directories were 
installed but not shipped in any package:
/opt
/opt/smf
/opt/smf/config
/opt/smf/config/net
/opt/smf/config/net/IP_SETTINGS.sh
Please set FILES such that these items are packaged. Alternatively if they are unneeded, 
avoid installing them or delete them within do_install.
extra-files: 5 installed and not shipped files. [installed-vs-shipped]
ERROR: extra-files-1.0-r0 do_package: Fatal QA errors were found, failing task.

Looking at other forum post, I did observed that to point towards current directory one should use variables given in meta/conf/bitbake.conf. But there is nothing mentioned there for /opt directory.

Also, I am on the kirkstone branch Thanks in advance


Solution

  • I found out what was actually causing the error. In kirkstone branch of yocto the underscore has been switched to colon for overrides. So I change FILES_${PN} to FILES:${PN} and it worked.