Re: question about PREFERRED_RPROVIDER

John Wang

I did as Richard suggested, It worked as expected now or
SRC_URI = "git://public or git://private"

PROVIDES += "virtual/feature"
RPROVIDES:${PN} += " \
virtual-feature \

PREFERRED_PROVIDER_virtual/feature = "feature-public"

Khem Raj <raj.khem@...> 于2022年8月13日周六 22:11写道:

fetcher will try to get versions of recipes during parse phase and if
your recipes are using AUTOREV they will try to poke at git server for
latest commit SHA
are you using AUTOREV by chance ?
No, and I will avoid to use AUTOREV, thank you

I checked the yocto-manual, and saw

If you use a virtual/\* item with PREFERRED_PROVIDER, then any recipe
that PROVIDES that item but is not selected (defined) by
PREFERRED_PROVIDER is prevented from building, which is usually
desirable since this mechanism is designed to select between mutually
exclusive alternative providers[1].

Do you mean if I use AUTOREV, bitbake sill tries to fetch ?

And, I am confused about the "PREFERRED_RPROVIDER" , I saw someone
use this variable[2], but I cannot find any thing about it In the
manual [3]


On Sat, Aug 13, 2022 at 2:57 AM John Wang <wangzq.jn@...> wrote:


There is a package with two versions, private and public.
But when I use the PREFERRED_RPROVIDER to select the public version,
bitbake still tries fetch the private one, and then bitabke terminates
because do_fetch fails (no permission)

What I expect is that when I select the public repository version, it
should not fetch the private repository, am I right?
Or, should I not use the PREFERRED_RPROVIDER to select a public/private repo ?

Could someone guide me :)

SRC_URI = "git://public"

RPROVIDES:${PN} += " \
virtual-feature \

SRC_URI= "git://private"

RPROVIDES:${PN} += " \
virtual-feature \


PREFERRED_RPROVIDER_virtual-feature = "feature-public"

Join to automatically receive all group messages.