All of lore.kernel.org
 help / color / mirror / Atom feed
* How to pass arguments to a shell function from python task bb.build.exec_func ? #yocto #bitbake
@ 2021-07-21 15:45 Bel Hadj Salem Talel
  2021-07-21 16:32 ` [yocto] " Joshua Watt
  0 siblings, 1 reply; 2+ messages in thread
From: Bel Hadj Salem Talel @ 2021-07-21 15:45 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

Hi All,

I have this example that can call a shell function from a python task:

*shell_function(){*
*bbwarn "This is a shell function, arg1 = $1"*
*}*

*python do_something(){*
*bb.build.exec_func('shell_function', d)*
*}*

How to pass arguments to the shell function ?

I tried this : " *bb.build.exec_func('shell_function 1', d)"* but it fails with the error: "shell_function 1" not found.

Thanks,
Talel

[-- Attachment #2: Type: text/html, Size: 631 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [yocto] How to pass arguments to a shell function from python task bb.build.exec_func ? #yocto #bitbake
  2021-07-21 15:45 How to pass arguments to a shell function from python task bb.build.exec_func ? #yocto #bitbake Bel Hadj Salem Talel
@ 2021-07-21 16:32 ` Joshua Watt
  0 siblings, 0 replies; 2+ messages in thread
From: Joshua Watt @ 2021-07-21 16:32 UTC (permalink / raw)
  To: Bel Hadj Salem Talel, yocto

[-- Attachment #1: Type: text/plain, Size: 619 bytes --]

AFAIK, passing arguments from a python function to a shell function is 
not allowed

On 7/21/21 10:45 AM, Bel Hadj Salem Talel wrote:
> Hi All,
>
> I have this example that can call a shell function from a python task:
>
> *shell_function(){*
> *    bbwarn "This is a shell function, arg1 = $1"*
> *}*
>
> *python do_something(){*
> *   bb.build.exec_func('shell_function', d)*
> *}*
>
> How to pass arguments to the shell function ?
>
> I tried this : "*bb.build.exec_func('shell_function 1', d)"* but it 
> fails with the error: "shell_function 1" not found.
>
> Thanks,
> Talel
>
> 
>

[-- Attachment #2: Type: text/html, Size: 1403 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-21 16:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 15:45 How to pass arguments to a shell function from python task bb.build.exec_func ? #yocto #bitbake Bel Hadj Salem Talel
2021-07-21 16:32 ` [yocto] " Joshua Watt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.