From: Gary Thomas <gary@mlbassoc.com>
To: yocto@yoctoproject.org
Subject: Re: Query configuration
Date: Thu, 19 Nov 2015 10:01:36 -0700 [thread overview]
Message-ID: <564E0070.3090708@mlbassoc.com> (raw)
In-Reply-To: <564DFBEA.5070104@mlbassoc.com>
On 2015-11-19 09:42, Gary Thomas wrote:
> I have a recipe that needs to make sure a global setting is
> in place (used by a different recipe). How can I test for
> this variable/setting in my recipe and issue a warning/error
> if it is not?
>
> Thanks for any ideas
>
Never mind - it occurred to me to see if some other recipe had
such checks and I found some and was able to add this to my recipe:
# Make sure SPI will is enabled
python do_check_variables() {
ENABLE_SPI_BUS = d.getVar('ENABLE_SPI_BUS', True)
if ENABLE_SPI_BUS != '1':
bb.fatal("PiFace module can't work without SPI support - Add ENABLE_SPI_BUS='1' to local.conf")
}
addtask check_variables before do_fetch
Not sure if this is the best way but it suffices.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
next prev parent reply other threads:[~2015-11-19 17:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-19 16:42 Query configuration Gary Thomas
2015-11-19 17:01 ` Gary Thomas [this message]
2015-11-19 17:22 ` Paul Eggleton
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=564E0070.3090708@mlbassoc.com \
--to=gary@mlbassoc.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.