Ziegfried
Ziegfried

Reputation: 141

How to install files in Yocto

I wrote Yocto recipe for library and try to install to image.

When I run command "bitbake myproject" I get follow error:

ERROR: sxe-0.1-r0 do_package: QA Issue: sxe: Files/directories were installed but not shipped in any package:
  /sxe
  /usr/share
  /usr/share/sxm
  /usr/share/sxm/baselines
  /usr/share/sxm/baselines/resources.psv
  /usr/share/sxm/baselines/resources_bcatl.psv
  /usr/share/sxm/baselines/version.txt
  /usr/share/sxm/baselines/resources_bcatp.psv
  /usr/share/sxm/baselines/cgs
  /usr/share/sxm/baselines/alerts
  /usr/share/sxm/baselines/IntegratedSportsLogos
  /usr/share/sxm/baselines/states
  /usr/share/sxm/baselines/IntegratedLogos
  /usr/share/sxm/baselines/tabweather
  /usr/share/sxm/baselines/trafficplus
  /usr/share/sxm/baselines/stocks
  /usr/share/sxm/baselines/ev
  /usr/share/sxm/baselines/contentAssociatedImage/Album020.zip
  /usr/share/sxm/baselines/gmd/GEMBase_1.15.zip
  /usr/share/sxm/baselines/parking/ParkingLocation2.zip
  /usr/share/sxm/baselines/safeview/sxm_safeviewcameralocations_v120.zip
  /usr/share/sxm/baselines/safeview/sxm_safeviewcameratypes_v120.zip
  /usr/share/sxm/baselines/IntegratedBackgroundLogos/IntPortBack160816.zip
  /usr/share/sxm/baselines/IntegratedBackgroundLogos/IntLandBack160816.zip
  /usr/share/sxm/baselines/fuel/sxm_fuelbaseline23.pvn1.zip
  /usr/share/sxm/baselines/fuel/sxm_canfuelbaseline3.pvn1.zip
  /usr/share/sxm/baselines/phonetics/T005V054.psv.zip
  /usr/share/sxm/baselines/phonetics/T000V054.psv.zip
  /usr/share/sxm/baselines/phonetics/T001V011.psv.zip
  /usr/share/sxm/baselines/phonetics/T006V011.psv.zip
  /usr/share/sxm/baselines/phonetics/T003V003.psv.zip
  /usr/share/sxm/baselines/phonetics/T004V000.psv.zip
  /usr/share/sxm/baselines/phonetics/T002V000.psv.zip
  /usr/share/sxm/baselines/movies/sxm_theatersbaseline23.pvn1.zip
  /usr/share/sxm/baselines/movies/sxm_movieratingsv0.pvn1.zip
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
sxe: 55 installed and not shipped files. [installed-vs-shipped]
ERROR: sxe-0.1-r0 do_package: Fatal QA errors found, failing task.
ERROR: sxe-0.1-r0 do_package: Function failed: do_package
ERROR: Logfile of failure stored in: /home/local/SWTECNN/rkhairulin/imx-yocto-bspIII/build-wayland-imx8qmmekII/tmp/work/aarch64-poky-linux/sxe/0.1-r0/temp/log.do_package.32253
ERROR: Task (/home/local/SWTECNN/rkhairulin/imx-yocto-bspIII/sources/meta-sxe/recipes-example/example/sxe_0.1.bb:do_package) failed with exit code '1'

How can I fix the issue? What should I add to the ricpe?

Upvotes: 2

Views: 9372

Answers (3)

sancelot
sancelot

Reputation: 2053

All proposed solutions are deprecated.

now , use FILES:${PN} instead of FILES_${PN}

Upvotes: 0

Nayfe
Nayfe

Reputation: 2300

By default, package with recipe name contains following files (see here):

     FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \
                 ${sysconfdir} ${sharedstatedir} ${localstatedir} \
                 ${base_bindir}/* ${base_sbindir}/* \
                 ${base_libdir}/*${SOLIBS} \
                 ${base_prefix}/lib/udev/rules.d ${prefix}/lib/udev/rules.d \
                 ${datadir}/${BPN} ${libdir}/${BPN}/* \
                 ${datadir}/pixmaps ${datadir}/applications \
                 ${datadir}/idl ${datadir}/omf ${datadir}/sounds \
                 ${libdir}/bonobo/servers"

So files in /usr/share/sxm and /sxe are created in ${D} deploy folder, but they are not added to any package.

You have to add this line to your recipe (see here):

FILES_${PN} += "/sxe ${datadir}/sxm" 

Note /usr/share is defined as ${datadir}


If you don't need those files you can remove them from ${D}:

do_install_append(){
     rm -r ${D}/sxe
     rm -r ${D}/${datadir}/sxm
}

Upvotes: 6

LetoThe2nd
LetoThe2nd

Reputation: 1326

You have to tell bitbake into which package the files shall go. Probably something like

FILES_sxe += " \
  {root_prefix}/sxe \
  {datadir}/sxe \
"

Having said that, placing something directly under / is strongly discouraged by the FHS. For more information on the predefined prefixes and directories, look at poky/meta/conf/bitbake.conf

Upvotes: 1

Related Questions