[oe] [meta-java] Unify virtual java providers

Pascal Bach pascal.bach at siemens.com
Fri Sep 2 09:41:00 UTC 2016


>> This is a hint that you need to set PREFERRED_PROVIDER_foo in your
>> local.conf (or machine.conf or distro.conf or...)
>>
>> http://www.yoctoproject.org/docs/2.1/mega-manual/mega-manual.html#var-PREFERRED_PROVIDER
>>
>> You might also need to set PREFERRED_VERSION, depending on the situation.
>>
>> My idea would be to allow the user to select a default provider for
> I think setting PREFERRED_VERSION is not the issue in my case.
>
> The reason I see the issue is that I also tried to set: RPROVIDES_${PN} += "virtual/jre" in order to allow users to select "virtual/jre"
>  in an RDEPENDS which I believe is necessary in many cases.
>
> However I don't know of a way to set a preferred RPROVIDER.
Sorry I completely missed that one can set PREFERRED_RPROVIDER too (it's not in the documentation only PREFERRED_PROVIDER is).

However when I set PREFERRED_RPROVIDER_virtual/jre = "zulu-java" i'm still not able to install zulu-java, openjdk and oracle-java at the same time.
I modified them all to RPROVIDE_${PN} += "virtual/jre" and added ALTERNATIVES for java vie updata-alternatives.
But bitbake gives me the following error:

ERROR: Nothing RPROVIDES 'oracle-java' (but /home/projects/image.bb RDEPENDS on or otherwise requires it)
ERROR: oracle-java was skipped: PREFERRED_PROVIDER_virtual/jre set to zulu-java, not oracle-java

So based on that I assume it's really not possible to have a preverd java REPROVIDER and still install others to be used via the alternatives system?

>
>>> "virtual/jre" but still allow to install an additional specific java
>>> provider if necessary.
>>> Is this even possible?
> Based on what I found out above, don't think this is possible. Please correct me if I'm wrong.
>
> Pascal




More information about the Openembedded-devel mailing list