Bug 9725

Summary: add docstrings to functions in lib/bb/utils.py that are used in meta- files.
Product: [Build System, Metadata & Runtime] BitBake Reporter: brian avery <brian.avery>
Component: bitbakeAssignee: mshah
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: joshuagloe, mshah, poky.bs.watcher, poky.watcher, randy.macleod, richard.purdie
Version: 2.2   
Target Milestone: 3.3   
Hardware: x86   
OS: Multiple   
Whiteboard: NEWCOMER
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Bug Depends on:    
Bug Blocks: 9612    

Description brian avery 2016-06-07 21:27:08 UTC
a number of functions in lib/bb/utils.py are used throughout the meta*/ recipe and bbclass files. These need docstrings for programmers and so that we have a starting point for actual documentation.  Here's a not guaranteed comprehensive list of functions that are missing docstrings:
explode_dep_versions
explode_versions
vercmp*
prunedir
contains_any
Comment 1 Randy MacLeod 2020-04-09 15:17:34 UTC
Robert, would you like to work on this?
Comment 2 mshah 2020-12-30 11:30:08 UTC
@brian @Randy
I'll be happy to work on this. 
I can see other functions as well which don't have docstrings. Should I add it to all remaining functions or anyone have a specific function list?
Comment 3 Randy MacLeod 2021-01-05 00:48:56 UTC
Milan, Thanks. Brian isn't involved in YP currently.
I'd say start with a few and see if they get merged and the keep going as you see fit.
Comment 4 mshah 2021-01-05 05:18:20 UTC
Thanks, Randy. I'll take the bug and start working.
Comment 5 mshah 2021-01-05 06:13:05 UTC
I have gone through both Bug 9725 and Bug 9612 and found a list of functions.

Functions that already have a docstring.
- contains
- lockfile
- unlockfile
- explode_dep_versions2
- join_deps
- explode_deps
- mkdirheir
- copyfile

Functions that need a docstring.
- prunedir
- explode_dep_versions
- vercmp*
- contains_any
Comment 6 mshah 2021-01-11 13:03:11 UTC
Hi @randy.macleod@windriver.com,

Patch is accepted and merged to master branch.
Ref:
https://git.openembedded.org/bitbake/commit/?id=b61ba4a18693a9e553d2a93161feb0bcc1c82384

I'm marking the bug as resolved now.
Comment 7 Richard Purdie 2021-01-13 23:27:12 UTC
Looks good, thanks for the help on this!
Comment 8 Randy MacLeod 2021-01-14 14:17:17 UTC
Thanks Milan.