From: Joshua Watt <jpewhacker@gmail.com>
To: "Iván Castell" <icastell@nayarsystems.com>,
"Yocto Project" <yocto@yoctoproject.org>
Subject: Re: Expansion of variables inside do_package_prepend task
Date: Wed, 21 Feb 2018 10:17:35 -0600 [thread overview]
Message-ID: <1519229855.26755.10.camel@gmail.com> (raw)
In-Reply-To: <CAALXFYwsMACwdPf+QQNTwROGeqXD_FiBo4o=9kw=bV4JKrJfaw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1106 bytes --]
On Wed, 2018-02-21 at 16:50 +0100, Iván Castell wrote:
> Hello forum.
>
> I have a question regarding the expansion of variables in a recipe.
> Suppose I have a recipe with this "do_install" task defined:
>
> do_install() {
> BBB = ${WORKDIR}
> }
>
> Variable BBB expands to the proper working directory.
>
>
> $ bitbake -e <myrecipe> | grep BBB
> BBB = /path/to/working/directory
>
>
> However, suppose now I have a recipe with this "do_package_prepend"
> task defined:
>
> do_package_prepend() {
> AAA = ${WORKDIR}
> }
>
> Variable AAA doesn't expand to the expected working directory. In
> fact, it generates an error:
>
>
> $ bitbake -e <myrecipe> | grep AAA
> AAA = ${WORKDIR}
> ^
> SyntaxError: invalid syntax
do_package is a python function, so you prepend code must also be
python. You can do:
AAA = d.getVar('WORKDIR')
> It seems the expansion of variables is not working inside the
> do_package_prepend task. What is going wrong with that?
>
> Thank you in advance! :-)
>
>
[-- Attachment #2: Type: text/html, Size: 4247 bytes --]
next prev parent reply other threads:[~2018-02-21 16:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 15:50 Expansion of variables inside do_package_prepend task Iván Castell
2018-02-21 16:17 ` Joshua Watt [this message]
2018-02-22 16:11 ` Iván Castell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1519229855.26755.10.camel@gmail.com \
--to=jpewhacker@gmail.com \
--cc=icastell@nayarsystems.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.