If I create a recipe which has additional PACKAGES added and distinct RDEPENDS are added to this 'sub' package. Then install only the main pkg (not the sub-pkg) the RDEPENDS will be included in the image despite no actual dependencies. So for example I can create a simple recipe such as ---meta/recipes-extended/sample/sample_1.0.bb--- LICENSE = "CLOSED" LIC_FILES_CHKSUM = "" PACKAGES += "${PN}-extra" S = "${WORKDIR}" RDEPENDS_${PN}-extra += "findutils" # No information for SRC_URI yet (only an external source tree was specified) SRC_URI = "file://sample.txt" # NOTE: no Makefile found, unable to determine what needs to be done do_configure () { # Specify any needed configure commands here : } do_compile () { # Specify compilation commands here : } do_install () { install -d ${D}/${datadir}/${BPN} install ${S}/sample.txt ${D}/${datadir}/${BPN}/. } --- [create the needed sample.txt file] Then setup a bog standard yocto build by sourcing 'oe-init-build-env'. Edit the local.conf to include [CORE_IMAGE_EXTRA_INSTALL += "sample"]. Build and run. You will discover that findutils is installed and available in the rootfs image, since the -extra sub-pkg is not being requested to be included in the image, this is unexpected. NOTE: this is using dnf, as per the default build setup.
Created attachment 3834 [details] Sample recipe
Do you have dev-pkgs or dbg-pkgs enabled in the image?
With the sample recipe, PN-extras isn't generated so anything there is a red herring. My hunch is that you've dev-pkgs IMAGE_FEATURE enabled which means that sample-dev is installed. As dev packages depend on the -dev form of all build dependencies this means that sample-dev RDEPENDS on findutils-dev, which depends on findutils. Marking as NEEDINFO, Mark can you verify that this hypothesis is correct or not.
Ross, 'bitbake core-image-minimal -e' where I have CORE_IMAGE_EXTRA_INSTALL += "sample", I see: IMAGE_FEATURES="debug-tweaks ptest-pkgs" My sample may not be complete enough but if you do add to it the outcome remains the same. The presence of the sub-pkg RDEPENDS will cause these pkgs to be installed in the image.
(In reply to comment #4) > My sample may not be complete enough but if you do add to it the outcome > remains the same. The presence of the sub-pkg RDEPENDS will cause these pkgs > to be installed in the image. There's probably something else still at play here -- adding "sample" to an image just doesn't bring findutils with it here.
(In reply to comment #5) > (In reply to comment #4) > > My sample may not be complete enough but if you do add to it the outcome > > remains the same. The presence of the sub-pkg RDEPENDS will cause these pkgs > > to be installed in the image. > > There's probably something else still at play here -- adding "sample" to an > image just doesn't bring findutils with it here. I am checking the 'sample' recipe again. I might have to abandon it in favour of the real recipe I am seeing this with (openvswitch in meta-virt). Will let you know.
Created attachment 3846 [details] updated sample .bb
(In reply to comment #6) > (In reply to comment #5) > > (In reply to comment #4) > > > My sample may not be complete enough but if you do add to it the outcome > > > remains the same. The presence of the sub-pkg RDEPENDS will cause these pkgs > > > to be installed in the image. > > > > There's probably something else still at play here -- adding "sample" to an > > image just doesn't bring findutils with it here. > > I am checking the 'sample' recipe again. I might have to abandon it in > favour of the real recipe I am seeing this with (openvswitch in meta-virt). > Will let you know. OK, attached is the updated sample .bb which matches more closely the recipe I encountered this issue with. Note that I still only have CORE_IMAGE_EXTRA_INSTALL += "sample" yet you can see that findutils is being installed Installing : findutils-4.6.0-r0.i586 6/17 I am investigating ptest.bbclass for clues as it seems to be involved, though I thought I had seen this reproduced without ptest. Mark
Still having trouble making the 'sample' recipe behave in the way I am seeing with the openvswitch recipe. Rather than waste folks time let me do some more investigation and update the case once I can put together a proper reproducer.
I went back and looked at the dependencies closer after failing to make the sample recipe behave the same as the recipe I was seeing the issue, looking more closely at Ross' comment #2. Turns out findutils was being pulled in via the -dev package.