All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] base_less_or_equal() for numerical value testing in OE
@ 2007-02-27 20:35 Paul Sokolovsky
  2007-02-27 20:38 ` Koen Kooi
  2007-02-27 20:49 ` Richard Purdie
  0 siblings, 2 replies; 17+ messages in thread
From: Paul Sokolovsky @ 2007-02-27 20:35 UTC (permalink / raw)
  To: openembedded-devel

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




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

end of thread, other threads:[~2007-03-05 10:07 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-27 20:35 [RFC] base_less_or_equal() for numerical value testing in OE Paul Sokolovsky
2007-02-27 20:38 ` 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

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.