title: Two different recipes names providing same package with different versions. How can one force a default one?
body: <p>I have my Yocto environment (on meta-oe/recipes-test) the old <code>gmock</code> and <code>gtest</code> libs.</p>
  <p>Nowadays I want to update it to newest release, although both libs were merged into a new one called <code>googletest</code>. To achieve that I'm adding the new recipe for <code>googletest</code> <a href="https://layers.openembedded.org/layerindex/recipe/108109/" rel="nofollow noreferrer">(here's the recipe)</a> into a new layer already created by me. <strong>Keep in mind this new version <code>PROVIDES += gmock gtest</code></strong></p>
  <p>So far so good. Here's the tricky part, on my image <code>layer.conf</code> I added this:</p>
  <pre><code>PREFERRED_PROVIDER_gtest ?= &quot;googletest&quot;
  PREFERRED_PROVIDER_gmock ?= &quot;googletest&quot;
  PREFERRED_VERSION_gtest ?= &quot;1.8.1&quot;
  PREFERRED_VERSION_gmock ?= &quot;1.8.1&quot;
  </code></pre>
  <p>So I keep getting several errors, I'll try to split them here:</p>
  <p><strong>FIRST:</strong></p>
  <pre><code>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
  </code></pre>
  <p><strong>SECOND:</strong></p>
  <pre><code>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.
  </code></pre>
  <p>As I said I still get several different errors, but generically speaking, the question is:</p>
  <p><strong>TL;DR</strong></p>
  <p>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?</p>