1

I have a yocto recipe that builds, a Java .jar file, and it's needed to be included at the target and development packages, I already tried to explicity the files, but yocto doesn't create two packages with the same content. I'm trying this:

FILES_${PN} = "${libdir}/libfoo.jar"
FILES_${PN}-dev  = "${libdir}/libfoo.jar"

But the dev package still empty.

How can I add this file to theese 2 packages?

  • If `PACKAGES` isn't modified, `${PN}-dev` should have the libfoo.jar but not `${PN}` so there's definitely something important in your recipe that you've not shared with us. Moreover, one file cannot be in two packages, that's a principle of Yocto. Could you please give us the recipe and context? – qschulz Jul 29 '20 at 17:41

1 Answers1

2

What if you create a base package and make your two packages depend on it?

PACKAGES = "${PN}-dbg ${PN}-base ${PN} ${PN}-dev"

RDEPENDS_${PN} += "${PN}-base"
RDEPENDS_${PN}-dev += "${PN}-base"
j4x
  • 3,595
  • 3
  • 33
  • 64
  • 2
    That's already the case by default. `RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPKGV})"`. c.f. http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/conf/bitbake.conf#n322 – qschulz Jul 29 '20 at 17:39