All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Dechesne <nicolas.dechesne@linaro.org>
To: "Allen Kennedy Jr." <allen@kennedystuff.com>
Cc: Yocto list discussion <yocto@yoctoproject.org>
Subject: Re: Environment Variables being unset by bitbake?
Date: Thu, 10 Jul 2014 15:58:43 +0200	[thread overview]
Message-ID: <CAP71WjyovtW_yj4ckYXbAFKEc6FtiKwG1uOa9fKbvcmrtuGAeQ@mail.gmail.com> (raw)
In-Reply-To: <CAO-21LM7hApyatcYRqxgw9qAcG1zreQWnYjtUYabJfOfRfMM3A@mail.gmail.com>

On Thu, Jul 10, 2014 at 3:46 PM, Allen Kennedy Jr.
<allen@kennedystuff.com> wrote:
> All with no joy.  I did a bit of google-fu and came up with this one:
> on the command line: BB_ENV_EXTRAWHITE="JAVA_HOME" bitbake myRecipe

the manual says "You must set this variable in the external
environment in order for it to work.", so you really need to set it
before calling bitbake, not in the recipe.

>
> Which almost works, but not really.  my bbnote in my recipe exclaims: NOTE:
> java is here: /usr/local/java/jdk
> which is right, but then in the shell script that gets called after that,
> the first lines are:
> if [ -z "$JAVA_HOME" ]; then
>     echo "JAVA_HOME is not set"
>     exit 1
> fi
>
> Which turns out the error that JAVA_HOME is not set.
>
> again, this shell script works perfectly fine outside of the bitbake system.

you need to explicitely export the bitbake variable for the shell. in
your recipe:
export JAVA_HOME="${JAVA_HOME}"


  reply	other threads:[~2014-07-10 13:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-09 20:58 Environment Variables being unset by bitbake? Allen Kennedy Jr.
2014-07-09 23:11 ` Patrick Doyle
2014-07-10  8:29 ` Nicolas Dechesne
2014-07-10 13:46   ` Allen Kennedy Jr.
2014-07-10 13:58     ` Nicolas Dechesne [this message]
     [not found]       ` <CAO-21LM=ucVNUPAwDgXA5FkB0dsi=ASQrgTSAaq+fFRhhkWaRA@mail.gmail.com>
2014-07-10 14:23         ` Nicolas Dechesne
2014-07-10 14:29           ` Allen Kennedy Jr.

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=CAP71WjyovtW_yj4ckYXbAFKEc6FtiKwG1uOa9fKbvcmrtuGAeQ@mail.gmail.com \
    --to=nicolas.dechesne@linaro.org \
    --cc=allen@kennedystuff.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.