Possible to ignore a missing file in recipe without error?



I have a simple recipe that installs a few miscellaneous files, one of the files may or may not be present and in reality that's ok for the moment, but I don't see a way to do things in a recipe based on the presence or absence of a file. 

For example:


FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

# always present file
SRC_URI += "file://myconfig.config"

# sometimes present file - is there a way to conditionally do this statement
SRC_URI += "file://myOtherConfig.config"

do_install() {
    install -d ${D}${sysconfdir}
    install -m 0755 ${WORKDIR}/myconfig.config ${D}${sysconfdir}
    #same here
    install -m 0755 ${WORKDIR}/myOtherConfig.config ${D}${sysconfdir}


FILES_${PN} += " ${sysconfdir}/myconfig.config "
#same here
FILES_${PN} += " ${sysconfdir}/myOtherConfig.config "

Many thanks

Join yocto@lists.yoctoproject.org to automatically receive all group messages.