Bug 9725 - add docstrings to functions in lib/bb/utils.py that are used in meta- files.
Summary: add docstrings to functions in lib/bb/utils.py that are used in meta- files.
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 3.3
Assignee: mshah
QA Contact:
URL:
Whiteboard: NEWCOMER
Depends on:
Blocks: 9612
  Show dependency tree
 
Reported: 2016-06-07 21:27 UTC by brian avery
Modified: 2021-01-14 14:17 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.