[yocto] How to remove packages from Image coming because of RDEPENDS

Lukasz Zemla Lukasz.Zemla at woodward.com
Tue Apr 23 04:13:29 PDT 2019


On Tuesday, April 23, 2019 12:08 PM, Priyanshu Sharma wrote:
> How can we remove inclusion of any package which comes because some other package RDPENDS on it?
> For example, rpcbind recipe RDEPENDS on shadow and libpam packages, 
> because of which if IMAGE_INSTALL+="rpcbind" is mentioned in recipe ( 
> even though shadow and libpam are not added like this explicilty) , shadow and libpam packages get packaged in Image rootfs.
> This even includes any bin/sbin provided by shadow/libpam, even when they are not needed in rootfs.

> Is there an optimum way to control inclusion of RDEPENDS packages? One 
> way is to use ROOTFS_POST_PROCESS and remove specific files after do_rootfs task is done.
> But is there a way to remove entire package, instead of removing each file ?

Typically I create .bbappend with following:
RDEPENDS_${PN}_remove = "libpam"

But be careful what dependencies you remove. Sometimes Yocto sets too wide list of dependencies and in some configurations it is possible to remove them, but sometimes you may break some things. 

Best regards,
Lukasz Zemla


More information about the yocto mailing list