<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>7514</bug_id>
          
          <creation_ts>2015-03-25 14:12:43 +0000</creation_ts>
          <short_desc>bitbake-layers: canonical name of recipe</short_desc>
          <delta_ts>2015-06-05 13:23:15 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.9 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Ohly">patrick.ohly</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>cristina-danielax.agurida</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
          
          <qa_contact name="Cristina Agurida">cristina-danielax.agurida</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>49744</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2015-03-25 14:12:43 +0000</bug_when>
    <thetext>I&apos;d expect recipes to show up in the &quot;bitbake-layers show-recipes&quot; output under the name of their .bb file.

In Dizzy and master (shortly before Fido) and possibly older releases, one gets unexpected output at least for openssl:

&gt; bitbake-layers show-recipes 2&gt;&amp;1 | grep openssl
nativesdk-openssl:
&gt; bitbake-layers show-recipes openssl
=== Available recipes: ===
openssl:
  meta                 1.0.2
&gt; bitbake-layers show-recipes -f 2&gt;&amp;1 | grep openssl
/data2/yocto/iot-os/meta/recipes-connectivity/openssl/openssl_1.0.2.bb

Note that it shows up as &quot;nativesdk-openssl&quot; in the first command variation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49746</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-03-25 14:35:44 +0000</bug_when>
    <thetext>Looking at the code in list_recipes() it sorts using sorted(pkg_pn) and only displays the first one matching a given file so &quot;nativesdk-openssl&quot; comes first and takes priority over openssl.

Reassigning to Paul to see what the intent of the code is...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49747</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-03-25 14:50:18 +0000</bug_when>
    <thetext>A possible fix:

diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index c1c65aa..9824629 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -501,7 +501,12 @@ skipped recipes will also be listed, with a &quot; (skipped)&quot; suffix.
 
             if len(allproviders[p]) &gt; 1 or not show_multi_provider_only:
                 pref = preferred_versions[p]
-                preffile = bb.cache.Cache.virtualfn2realfn(pref[1])[0]
+                realfn = bb.cache.Cache.virtualfn2realfn(pref[1])
+                preffile = realfn[0]
+                # We only display once per recipe, we should prefer non extended versions of the recipe if
+                # present (so openssl, not nativesdk-openssl which would otherwise sort first).
+                if realfn[1] and realfn[0] in self.bbhandler.cooker.recipecache.pkg_fn:
+                    continue
                 if preffile not in preffiles:
                     preflayer = self.get_file_layer(preffile)
                     multilayer = False</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49889</commentid>
    <comment_count>3</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-03-28 05:16:58 +0000</bug_when>
    <thetext>Hmm, yes, this is definitely not desirable.

Richard, your fix looks OK to me (although the comment probably ought to say &quot;e.g. in OpenEmbedded&quot; next to the example). Do you want to send the fix as a patch or shall I?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50291</commentid>
    <comment_count>4</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-04-14 12:17:10 +0000</bug_when>
    <thetext>Fix merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=df9069d958fc9348f0afe63a7d0e0a0454ebe9b4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51528</commentid>
    <comment_count>5</comment_count>
    <who name="Cristina Agurida">cristina-danielax.agurida</who>
    <bug_when>2015-06-05 13:23:15 +0000</bug_when>
    <thetext>Verified on master: fcc67ae90feeceee204bdb36e45eacf8d056779a</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>