3.1.3. Metadata (Virtual Providers)

Prior to the build, if you know that several different recipes provide the same functionality, you can use a virtual provider (i.e. virtual/*) as a placeholder for the actual provider. The actual provider would be determined at build time. In this case, you should add virtual/* to DEPENDS, rather than listing the specified provider. You would select the actual provider by setting the PREFERRED_PROVIDER variable (i.e. PREFERRED_PROVIDER_virtual/*) in the build's configuration file (e.g. poky/build/conf/local.conf).

Note

Any recipe that PROVIDES a virtual/* item that is ultimately not selected through PREFERRED_PROVIDER does not get built. Preventing these recipes from building is usually the desired behavior since this mechanism's purpose is to select between mutually exclusive alternative providers.

The following lists specific examples of virtual providers: