<?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>4349</bug_id>
          
          <creation_ts>2013-04-19 08:56:36 +0000</creation_ts>
          <short_desc>An easy way to find out why a recipe is built and installed (RDEPENDS)</short_desc>
          <delta_ts>2018-03-30 18:41:29 +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>1.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=4352</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Yang">liezhi.yang</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>corneliux.stoicescu</cc>
    
    <cc>Jc</cc>
    
    <cc>kergoth</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
    
    <cc>srifenbark</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>32378</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2013-04-19 08:56:36 +0000</bug_when>
    <thetext>The &quot;bitbake -g&quot; can generate pn-depends.dot and package-depends.dot, the advanced user can find out why a package is built (DEPENDS) and installed (RDEPENDS) from the two dot files, but it&apos;s not easy for a new user, maybe we can add an option like:

bitbake -w/--why &lt;recipe&gt; &lt;image&gt;

which will show the DEPENDS and RDPENDS of &lt;recipe&gt; for the &lt;image&gt;, e.g.:

bitbake -w curl core-image-sato

Or we can add a single python script bitbake-why in bitbake/bin/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32379</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2013-04-19 08:59:13 +0000</bug_when>
    <thetext>And such a function would make the user easy to remove a recipe/package which he doesn&apos;t need from the image.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32384</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-04-19 11:03:09 +0000</bug_when>
    <thetext>This would be very useful, we get asked how to find this information a lot. I guess it would show the whole dependency chain that resulted in the recipe being built. It would also need to handle dependencies at the task level (less likely than DEPENDS or RDEPENDS but it does occur).

I wonder if this ought to be part of the &quot;bb&quot; tool which I think we should be looking at integrating ( https://github.com/kergoth/bb )</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32882</commentid>
    <comment_count>3</comment_count>
    <who name="Christopher Larson">kergoth</who>
    <bug_when>2013-05-03 23:49:57 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; This would be very useful, we get asked how to find this information a lot.
&gt; I guess it would show the whole dependency chain that resulted in the recipe
&gt; being built. It would also need to handle dependencies at the task level
&gt; (less likely than DEPENDS or RDEPENDS but it does occur).
&gt; 
&gt; I wonder if this ought to be part of the &quot;bb&quot; tool which I think we should
&gt; be looking at integrating ( https://github.com/kergoth/bb )

The existing &apos;whatdepends&apos; subcommand shows what pulled something in, recursively, but currently only checks DEPENDS/PROVIDES, not runtime. My next task once I manage to find the time to look at this tool again will be to add full fledged handling of multiple types of dependency, with display of which one pulled it in.

Example of current whatdepends behavior:

$ bb whatdepends -r attr core-image-minimal
Parsing recipes..done.
acl
libcap
  avahi
  libgcrypt
    gtk+
      libglade

Example of the sort of all-types-of-dependency information I want to add to it, as an example of my previous &apos;dependinfo&apos; command, which did the opposite (showed what something depended on, not what depends on it) non-recursively: https://gist.github.com/kergoth/4455568</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32908</commentid>
    <comment_count>4</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2013-05-07 09:38:56 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; This would be very useful, we get asked how to find this information a lot.
&gt; &gt; I guess it would show the whole dependency chain that resulted in the recipe
&gt; &gt; being built. It would also need to handle dependencies at the task level
&gt; &gt; (less likely than DEPENDS or RDEPENDS but it does occur).
&gt; &gt; 
&gt; &gt; I wonder if this ought to be part of the &quot;bb&quot; tool which I think we should
&gt; &gt; be looking at integrating ( https://github.com/kergoth/bb )
&gt; 
&gt; The existing &apos;whatdepends&apos; subcommand shows what pulled something in,
&gt; recursively, but currently only checks DEPENDS/PROVIDES, not runtime. My
&gt; next task once I manage to find the time to look at this tool again will be
&gt; to add full fledged handling of multiple types of dependency, with display
&gt; of which one pulled it in.
&gt; 
&gt; Example of current whatdepends behavior:
&gt; 
&gt; $ bb whatdepends -r attr core-image-minimal
&gt; Parsing recipes..done.
&gt; acl
&gt; libcap
&gt;   avahi
&gt;   libgcrypt
&gt;     gtk+
&gt;       libglade
&gt; 
&gt; Example of the sort of all-types-of-dependency information I want to add to
&gt; it, as an example of my previous &apos;dependinfo&apos; command, which did the
&gt; opposite (showed what something depended on, not what depends on it)
&gt; non-recursively: https://gist.github.com/kergoth/4455568

Great, I&apos;ve tried it and it worked well, I think this is what we are looking for if it can check the RDEPENDS, is there anything I can do ? Do we plan to add it to yocto 1.5 ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32916</commentid>
    <comment_count>5</comment_count>
    <who name="Christopher Larson">kergoth</who>
    <bug_when>2013-05-07 13:57:51 +0000</bug_when>
    <thetext>If you check the yocto 1.5 features page on the wiki, you&apos;ll see that there&apos;s an entry for improving bitbake&apos;s UI along these lines. Whether it will take this form, I don&apos;t know, Richard and I often disagree about implementation, but something like this should be in the cards for 1.5.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32938</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-05-08 09:16:07 +0000</bug_when>
    <thetext>Robert asked me to comment. I agree with integrating something like this, the exact form just needs to be determined. I&apos;m not 100% sure exactly what makes sense at this point but I agree with the idea in principle.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34449</commentid>
    <comment_count>7</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2013-07-10 06:09:51 +0000</bug_when>
    <thetext>I&apos;ve tried to let the bb tool figure out which packages will be installed according to the RDEPENDS and RRECOMMENDS, but it is far away from the packages that are really installed:

For a core-image-sato:
1) the bb figures out 198 packages will be installed
2) but 387 packages are installed
3) For the 198 packages, 61 ones are not in the 387 ones

So I failed to figure out the one which would be installed, the problem is that the binary package (e.g., rpm) will have more depends info than RDEPENDS and RRECOMMENDS according the file dependcies. I&apos;d like to not add the RDEPENDS at the moment, it is still very useful for us though it doesn&apos;t support the RDEPENDS, for example, the &quot;bb whatdepends&quot;, &quot;bb edit&quot;, &quot;bb log&quot; and so on will help the end user a lot.

I think that what can we do next are:
1) Add the bb tool to yocto, I think that we can put it to poky/scripts/bb
   or poky/bitbake/contrib/

2) When we decide to add it to yocto, will we add all the source at one time ? Or   we will add the commit one by one ? There are 80 commits.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34450</commentid>
    <comment_count>8</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2013-07-10 06:27:26 +0000</bug_when>
    <thetext>Here is the draft patch, note, it is very rough:

http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=robert/bb_rdepends_draft&amp;id=e8561d22d00125889c674e353f377ce86abdfdaf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36061</commentid>
    <comment_count>9</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2013-08-30 01:45:44 +0000</bug_when>
    <thetext>Move to 1.6 after talked with Saul and RP.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37304</commentid>
    <comment_count>10</comment_count>
    <who name="Jay See">Jc</who>
    <bug_when>2013-09-27 21:03:59 +0000</bug_when>
    <thetext>Well I did it with your patch but had missed the comment about entering one repo per directory. I added them and now the flow is ok. 

I need to rebuild an image without curl to check if the dependency issue is solved or not...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51402</commentid>
    <comment_count>11</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2015-06-01 21:44:57 +0000</bug_when>
    <thetext>Hi, 

Not sure about the activity here on this bug.  I noted that we do have a &apos;bitbake -w&apos; command at the moment but it is for writing an event log.  If we do create some option to address this issue, it will definitely affect the BB user manual.  I am noting this here to be sure I see it.

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76841</commentid>
    <comment_count>12</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-09-14 15:15:17 +0000</bug_when>
    <thetext>taskexp is probably the best we have for this, although I think bb had a command which would show you the path between two recipes and can be used to see why a recipe is built for an image.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79773</commentid>
    <comment_count>13</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-03-09 04:00:50 +0000</bug_when>
    <thetext>I&apos;d say that oe-depends-dot (oe-core 7dc7860691304d63e7ad728d2180474906fe0a5c) is a good move towards this, closing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80052</commentid>
    <comment_count>14</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2018-03-30 18:41:29 +0000</bug_when>
    <thetext>Ross, 

Does this affect the BB manual at all?  

Scott</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>