<?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>6317</bug_id>
          
          <creation_ts>2014-05-13 08:41:57 +0000</creation_ts>
          <short_desc>Incorrect dependencies for -native recipes</short_desc>
          <delta_ts>2021-01-31 10:43:17 +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>OE-Core</product>
          <component>core</component>
          <version>1.6</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</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>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>otavio</cc>
    
    <cc>tomasz.dziendzielski</cc>
          
          
          <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>43275</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2014-05-13 08:41:57 +0000</bug_when>
    <thetext>If we have a recipe PN = &quot;x&quot; which has RDEPENDS_y = &quot;z&quot; (where y is a subpackage of x) and then we build x-native, it doesn&apos;t have a dependency on z-native.

This is due to the way native.bbclass extends recipes to a native version. It will look at:

RDEPENDS_x and RDEPENDS_${PN} as well as RDEPENDS but it will not look at subpackages.

Extending it to cover subpackages is non-trivial, not least that PACKAGES=&quot;&quot; in native.bbclass.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89049</commentid>
    <comment_count>1</comment_count>
    <who name="Tomasz Dziendzielski">tomasz.dziendzielski</who>
    <bug_when>2021-01-27 23:28:53 +0000</bug_when>
    <thetext>Can&apos;t we just get subpackages names with:
&gt;sorted((key for key in d.keys() if key.startswith(&quot;RDEPENDS_&quot;)))
?

Then how do we map package from RDEPENDS to recipe name that we should add to DEPENDS? For example if we have RDEPENDS_y = &quot;z-dev&quot; how to get &quot;z&quot; the correct way?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89096</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-01-31 10:42:50 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Can&apos;t we just get subpackages names with:
&gt; &gt;sorted((key for key in d.keys() if key.startswith(&quot;RDEPENDS_&quot;)))
&gt; ?

In theory we could however iterating d.keys() is extremely expensive and even in bitbake, we avoid it at all costs.

There is a much simpler way which is not to clear PACKAGES in the native case, then not only could we do the above more efficiently, but bitbake itself already handles it for us.

&gt; Then how do we map package from RDEPENDS to recipe name that we should add
&gt; to DEPENDS? For example if we have RDEPENDS_y = &quot;z-dev&quot; how to get &quot;z&quot; the
&gt; correct way?

Bitbake already handles this internally for the target recipe cases so we&apos;re just going to use the same mechanism for the native case.

The way it works is that bitbake knows about PACKAGES and can therefore know that z-dev is provided by a specific recipe.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89097</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-01-31 10:43:17 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=c4257ed8b1040a5a0e9a95846d81961741239116</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>