Skip to contentSkip to conversation

possible better wording to describe bitbake functions?

docs Robert P. J. Day 1 participant 1 message Mar 7, 2021 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 28 lines · Robert P. J. Day

perusing bitbake user manual, section 3.5, "Functions", which
opens with:

"As with most languages, functions are the building blocks that are used to build up operations into tasks. BitBake supports these types of functions:

* Shell Functions: Functions written in shell script and executed either directly as functions, tasks, or both. They can also be called by other shell functions.

* BitBake-Style Python Functions: Functions written in Python and executed by BitBake or other Python functions using bb.build.exec_func().

... snip ...

however, it's clear that one can also invoke shell functions from python functions via bb.build.exec_func() as well, as with this example from buildhistory.bbclass. here's an obvious shell function:

  buildhistory_commit() {
        if [ ! -d ${BUILDHISTORY_DIR} ] ; then
        ... snip ...

being invoked from a python routine:

Quoted 8 lines
  python buildhistory_eventhandler() {
       ... snip ...
                bb.build.exec_func("buildhistory_commit", localdata)

so is there a clearer way to word this to clarify that shell functions are also callable via bb.build.exec_func()? or is that somehow implied by the current wording?

never mind, just noticed that the above is explained further down
that chapter in a Note.

rday