<?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>9612</bug_id>
          
          <creation_ts>2016-05-09 23:17:13 +0000</creation_ts>
          <short_desc>functions used in recipes and recipe examples (like bb.utils.contains) not documented.</short_desc>
          <delta_ts>2026-10-23 08:13:48 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>Mega Manual</product>
          <component>mega-manual</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>IN PROGRESS REVIEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>6.2 M4</target_milestone>
          <dependson>9725</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="brian avery">brian.avery</reporter>
          <assigned_to name="Antonin Godard">antonin.godard</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>mathieu.dubois-briand</cc>
    
    <cc>michael.opdenacker</cc>
    
    <cc>mshah</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
    
    <cc>srifenbark</cc>
    
    <cc>tim.orling</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>62058</commentid>
    <comment_count>0</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2016-05-09 23:17:13 +0000</bug_when>
    <thetext>Some useful functions like  bb.utils.contains are used in recipes, and appear in the mega-manual in a number of examples in that manual.  Unfortunately the methods for the class and what the args are are not documented afaik.
What we say:
---
26.148. utils.bbclass¶

The utils class provides some useful Python functions that are typically used in inline Python expressions (e.g. ${@...}). One example use is for bb.utils.contains().

This class is enabled by default because it is inherited by the base class.
---
Seems like these should be documented especially if we are using them as examples in the manual.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62137</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-05-12 04:01:37 +0000</bug_when>
    <thetext>Looks like what we do have is a bit confused anyway. bb.utils is not the same thing as utils.bbclass (though there is some functional overlap).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62345</commentid>
    <comment_count>2</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-05-19 17:32:54 +0000</bug_when>
    <thetext>Paul, 

What do you suggest we do for the utils.bbclass description? (http://www.yoctoproject.org/docs/2.1/mega-manual/mega-manual.html#ref-classes-utils)

Here is an occurrence also - http://www.yoctoproject.org/docs/2.1/mega-manual/mega-manual.html#var-TUNE_ASARGS

And here - http://www.yoctoproject.org/docs/2.1/mega-manual/mega-manual.html#var-TUNE_LDARGS

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62371</commentid>
    <comment_count>3</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2016-05-20 17:21:39 +0000</bug_when>
    <thetext>We should probably document all the functions used outside of the utils file including arguments and return values.  For ones commonly used in (contains, for instance) meta/bbclass files we should collocate the example with the definition of the function and arguments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62689</commentid>
    <comment_count>4</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-06-06 21:55:50 +0000</bug_when>
    <thetext>So we want to document all functions in the class?  I am not sure what you mean by document &quot;all functions outside of the utils file&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62719</commentid>
    <comment_count>5</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2016-06-07 19:51:04 +0000</bug_when>
    <thetext>What I meant by &quot;used outside&quot; of the utils file is that some of the functions in the utils file are class functions not meant to be used in recipes/classes.  The other functions, which amount to the utils API, are.  The API functions used in the outside recipes or bbclass files should be documented.

Functions like:
contains
lockfile
unlockfile
prunedir
explode_dep_versions2
join_deps
explode_deps
mkdirheir
copyfile

The above were from a quick grep/scan script and are probably not complete...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62723</commentid>
    <comment_count>6</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-06-07 20:57:08 +0000</bug_when>
    <thetext>If any of the functions we want documented don&apos;t have docstrings in the source then we need to fix that before sending over to Scott, just so he has something to work with.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62724</commentid>
    <comment_count>7</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-06-07 21:01:57 +0000</bug_when>
    <thetext>Of Brian&apos;s list the only one missing a docstring is prunedir, though that does have a non-docstring comment explaining what it does.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62725</commentid>
    <comment_count>8</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-06-07 21:06:59 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; Of Brian&apos;s list the only one missing a docstring is prunedir, though that
&gt; does have a non-docstring comment explaining what it does.

That&apos;s not true, explode_versions and explode_dep_versions don&apos;t have docstrings or comments.

I shall write a patch for bitbake/lib/bb/utils.py</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62728</commentid>
    <comment_count>9</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2016-06-07 21:28:17 +0000</bug_when>
    <thetext>see bug 9725 for the docstring bug. i put a list of fxns in it and made it block this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62844</commentid>
    <comment_count>10</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-06-09 16:39:21 +0000</bug_when>
    <thetext>So for documenting these functions, are we suggesting an entire new section in the ref-manual similar to how we document classes and tasks?  Right now we have long lists of these at http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#ref-classes and http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#ref-tasks, respectively.  

If so, I imagine that this would create a pretty big list of functions to document.  Am I right in understanding the bigger picture here for this documentation bug?

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62869</commentid>
    <comment_count>11</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2016-06-09 18:19:05 +0000</bug_when>
    <thetext>from my perspective, yes. I&apos;d add a new section Library funxtions (utils are in bitbake/lib/... ) and document each function that is intended for external use.
Paul, concur?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62878</commentid>
    <comment_count>12</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-06-09 21:25:40 +0000</bug_when>
    <thetext>Yes, that would make sense to me also.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62978</commentid>
    <comment_count>13</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-06-14 20:37:18 +0000</bug_when>
    <thetext>Okay... who can give me the list of functions we need?  Or, can I generate that list somehow?

Thanks,
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63000</commentid>
    <comment_count>14</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-06-15 13:29:55 +0000</bug_when>
    <thetext>Hi Scott,

(In reply to comment #13)
&gt; Okay... who can give me the list of functions we need?  Or, can I generate
&gt; that list somehow?

I have the AR to go and document the functions in the code, which is being tracked in the &quot;Depends on&quot; bug #9725:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=9725

When that work is done we should have both the list of functions that need documenting and comments in the code which can form the basis of some manual content.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72498</commentid>
    <comment_count>15</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-04-13 20:49:53 +0000</bug_when>
    <thetext>Joshua, 

Can you push this to post 2.3?  We can&apos;t get this done in time probably.  I would change it but I don&apos;t own it at the moment :)

thanks 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86969</commentid>
    <comment_count>16</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2020-04-09 15:18:14 +0000</bug_when>
    <thetext>Robert, would you like to work on this? We think it&apos;s important to have it documented.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87331</commentid>
    <comment_count>17</comment_count>
    <who name="Robert P. J. Day">rpjday</who>
    <bug_when>2020-05-25 15:19:16 +0000</bug_when>
    <thetext>OK, I&apos;ll take a look.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88908</commentid>
    <comment_count>18</comment_count>
    <who name="">mshah</who>
    <bug_when>2021-01-11 13:05:46 +0000</bug_when>
    <thetext>Hi All,

I fixed Bug 9725 and one can have a look at the changes from the link mentioned in the comments of Bug 9725.

Is there any work needed for this bug now? If Yes then please let me know.

Thanks,
Milan Shah</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88917</commentid>
    <comment_count>19</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-01-13 23:30:09 +0000</bug_when>
    <thetext>(In reply to comment #18)
&gt; Hi All,
&gt; 
&gt; I fixed Bug 9725 and one can have a look at the changes from the link
&gt; mentioned in the comments of Bug 9725.
&gt; 
&gt; Is there any work needed for this bug now? If Yes then please let me know.
&gt; 
&gt; Thanks,
&gt; Milan Shah

For this bug, the work is to add a new &quot;library functions&quot; section to the manual in the reference manual in the yocto-docs repository and document the utils functions to start with.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89538</commentid>
    <comment_count>20</comment_count>
    <who name="">mshah</who>
    <bug_when>2021-03-09 13:09:39 +0000</bug_when>
    <thetext>(In reply to comment #19)
&gt; For this bug, the work is to add a new &quot;library functions&quot; section to the
&gt; manual in the reference manual in the yocto-docs repository and document the
&gt; utils functions to start with.

Hi Richard,
Does it means that I need to create a new file under ref-manual with library functions.rst name and write function details there?
If yes then can you share a template to follow or show me a sample to start with?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89542</commentid>
    <comment_count>21</comment_count>
    <who name="">mshah</who>
    <bug_when>2021-03-09 13:47:54 +0000</bug_when>
    <thetext>(In reply to comment #19)
&gt; 
&gt; For this bug, the work is to add a new &quot;library functions&quot; section to the
&gt; manual in the reference manual in the yocto-docs repository and document the
&gt; utils functions to start with.

Hi Richard,

I&apos;m making a list of all functions to add to the document. I&apos;m concerned about the ordering of these functions.

Should I order them alphabetically? 

If yes then there are some functions that start with an underscore ( _ ), where should I put them?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89616</commentid>
    <comment_count>22</comment_count>
    <who name="">mshah</who>
    <bug_when>2021-03-12 12:39:24 +0000</bug_when>
    <thetext>Patch is sent for review.

View/Reply Online (#899): https://lists.yoctoproject.org/g/docs/message/899</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89621</commentid>
    <comment_count>23</comment_count>
    <who name="">mshah</who>
    <bug_when>2021-03-15 06:05:03 +0000</bug_when>
    <thetext>New Patch is sent
-----------------
View/Reply Online (#903): https://lists.yoctoproject.org/g/docs/message/903</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90416</commentid>
    <comment_count>24</comment_count>
    <who name="">mshah</who>
    <bug_when>2021-05-19 05:14:08 +0000</bug_when>
    <thetext>Do we have any update on patch review?

Regards
Milan Shah</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90418</commentid>
    <comment_count>25</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-05-20 01:14:01 +0000</bug_when>
    <thetext>Pinged the v2 thread and added michael.opdenacker@bootlin.com</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91966</commentid>
    <comment_count>26</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-11-11 15:59:27 +0000</bug_when>
    <thetext>Michael, can you followup on this please?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99992</commentid>
    <comment_count>27</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-10-24 15:03:54 +0000</bug_when>
    <thetext>Bulk move of 5.1 M4 to 5.2 M2 as approved by AlexB.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101185</commentid>
    <comment_count>28</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-02-20 16:21:11 +0000</bug_when>
    <thetext>Antonin,
There is a patch on the list as mentioned in the bug or comments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101701</commentid>
    <comment_count>29</comment_count>
    <who name="Antonin Godard">antonin.godard</who>
    <bug_when>2025-04-22 08:55:20 +0000</bug_when>
    <thetext>Patches sent on bitbake list to auto document patches from the Python docstrings:

https://lists.openembedded.org/g/bitbake-devel/topic/patch_0_4_document_library/112332815

Moving to In Progress Review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102198</commentid>
    <comment_count>30</comment_count>
    <who name="Antonin Godard">antonin.godard</who>
    <bug_when>2025-06-06 07:45:01 +0000</bug_when>
    <thetext>Bulk move of bugs I am assigned to from Milestone 5.2 to 5.3M1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106676</commentid>
    <comment_count>31</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-08-28 08:02:02 +0000</bug_when>
    <thetext>I can see patch merged: https://git.openembedded.org/bitbake/commit/?id=0a711949acc2696f32a61c591ee3ea37041acb91

Antonin, do we need more or should we close this bug entry?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106678</commentid>
    <comment_count>32</comment_count>
    <who name="Antonin Godard">antonin.godard</who>
    <bug_when>2026-08-28 09:01:02 +0000</bug_when>
    <thetext>(In reply to Mathieu Dubois-Briand from comment #31)
&gt; I can see patch merged:
&gt; https://git.openembedded.org/bitbake/commit/
&gt; ?id=0a711949acc2696f32a61c591ee3ea37041acb91
&gt; 
&gt; Antonin, do we need more or should we close this bug entry?

It has been on my mind to try and to the same of `oe.utils.*` function and incorporate that to yocto-docs somehow, which is probably why I haven&apos;t closed this bug yet.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>