From: Paul Sokolovsky <pmiscml@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [RFC] base_less_or_equal() for numerical value testing in OE
Date: Tue, 27 Feb 2007 22:35:00 +0200 [thread overview]
Message-ID: <407130732.20070227223500@gmail.com> (raw)
Hello openembedded-devel,
OE has base_conditional() function which is kind of C's ternary ?:
operator, with equality of two value as a condition (it is a bit
misnamed in this respect, it'd rather be base_equals() ).
There're few other such conditional functions, for example for set
containment check. What we lack however is simple numeric less/greater
check. Having it would be important for us to continue started work of
using generalized machine feature checks to decide on some aspects of
image/package building, instead of hardcoding tests for specific
machines.
So, hitting such need yet another time, I proceeded to add
base_less_or_equal() to base.bbclass, and used it to tweak locale
package install for Angstrom:
# Also, it appears that no locales fit in 16Mb for now. "C" locale rules!
IMAGE_LINGUAS = '${@base_less_or_equal("ROOT_FLASH_SIZE", "16", "", "en-gb", d)}'
This shows common usecase, and makes clear why exactly
base_less_or_equal() was added - I don't have a usecase for
base_less() now at all.
This code was committed, as it doesn't affect any existing aspect of
OE. Please feel free to tweak it, and of course use!
--
Best regards,
Paul mailto:pmiscml@gmail.com
next reply other threads:[~2007-02-27 20:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-27 20:35 Paul Sokolovsky [this message]
2007-02-27 20:38 ` [RFC] base_less_or_equal() for numerical value testing in OE Koen Kooi
2007-02-27 20:49 ` Paul Sokolovsky
2007-02-27 20:49 ` Richard Purdie
2007-02-27 21:31 ` Paul Sokolovsky
2007-02-27 21:40 ` Koen Kooi
2007-02-27 22:07 ` Paul Sokolovsky
2007-02-27 22:03 ` Richard Purdie
2007-03-04 23:30 ` Paul Sokolovsky
2007-03-04 23:40 ` Richard Purdie
2007-03-05 6:56 ` Koen Kooi
2007-03-05 8:12 ` Marcin Juszkiewicz
2007-03-05 10:07 ` Paul Sokolovsky
2007-03-05 9:33 ` Paul Sokolovsky
2007-02-28 13:09 ` Koen Kooi
2007-02-28 14:04 ` Philip Balister
2007-03-04 23:34 ` Paul Sokolovsky
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=407130732.20070227223500@gmail.com \
--to=pmiscml@gmail.com \
--cc=openembedded-devel@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox