Two different recipes names providing same package with different versions. How can one force a default one?

2.2k views Asked by At

I have my Yocto environment (on meta-oe/recipes-test) the old gmock and gtest libs.

Nowadays I want to update it to newest release, although both libs were merged into a new one called googletest. To achieve that I'm adding the new recipe for googletest (here's the recipe) into a new layer already created by me. Keep in mind this new version PROVIDES += gmock gtest

So far so good. Here's the tricky part, on my image layer.conf I added this:

PREFERRED_PROVIDER_gtest ?= "googletest"
PREFERRED_PROVIDER_gmock ?= "googletest"
PREFERRED_VERSION_gtest ?= "1.8.1"
PREFERRED_VERSION_gmock ?= "1.8.1"

So I keep getting several errors, I'll try to split them here:

FIRST:

NOTE: preferred version 1.8.1 of gtest not available (for item gtest)
NOTE: versions of gtest available: 1.7.0
NOTE: preferred version 1.8.1 of gmock not available (for item gmock)
NOTE: versions of gmock available: 1.7.0
NOTE: preferred version 1.8.1 of gtest not available (for item gtest-staticdev)
NOTE: versions of gtest available: 1.7.0
NOTE: preferred version 1.8.1 of gtest not available (for item gtest-dev)
NOTE: versions of gtest available: 1.7.0
NOTE: preferred version 1.8.1 of gmock not available (for item gmock-dev)
NOTE: versions of gmock available: 1.7.0
NOTE: preferred version 1.8.1 of gmock not available (for item gmock-staticdev)
NOTE: versions of gmock available: 1.7.0
NOTE: preferred version 1.8.1 of gtest not available (for item gtest)
NOTE: versions of gtest available: 1.7.0
NOTE: preferred version 1.8.1 of gmock not available (for item gmock)
NOTE: versions of gmock available: 1.7.0

SECOND:

Multiple .bb files are due to be built which each provide gmock (PATH/sources/meta-openembedded/meta-oe/recipes-test/gmock/gmock_1.7.0.bb PATH/sources/my-meta/recipes-test/googletest/googletest_1.8.1.bb).
     This usually means one provides something the other doesn't and should.
    ERROR: Multiple .bb files are due to be built which each provide nativesdk-gmock (virtual:nativesdk:PATH/sources/my-meta/recipes-test/googletest/googletest_1.8.1.bb virtual:nativesdk:PATH/sources/meta-openembedded/meta-oe/recipes-test/gmock/gmock_1.7.0.bb).
     This usually means one provides something the other doesn't and should.
    ERROR: Multiple .bb files are due to be built which each provide gtest (PATH/sources/meta-openembedded/meta-oe/recipes-test/gtest/gtest_1.7.0.bb PATH/sources/my-meta/recipes-test/googletest/googletest_1.8.1.bb).
     This usually means one provides something the other doesn't and should.
    ERROR: Multiple .bb files are due to be built which each provide nativesdk-gtest (virtual:nativesdk:PATH/sources/meta-openembedded/meta-oe/recipes-test/gtest/gtest_1.7.0.bb virtual:nativesdk:PATH/sources/my-meta/recipes-test/googletest/googletest_1.8.1.bb).
     This usually means one provides something the other doesn't and should.

As I said I still get several different errors, but generically speaking, the question is:

TL;DR

How can I make a recipe that doesn't have the exact same name of what it provides to be choosen by bitbake as default instead a previous version of it which HAS the recipe name identical of what it provides? What am I doing wrong?

0

There are 0 answers