<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/lib/oe/data.py, branch edison-6.0.1</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=edison-6.0.1</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=edison-6.0.1'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2012-01-30T16:38:01+00:00</updated>
<entry>
<title>data.py: fixed message domain errors</title>
<updated>2012-01-30T16:38:01+00:00</updated>
<author>
<name>Samuel Stirtzel</name>
<email>s.stirtzel@googlemail.com</email>
</author>
<published>2011-09-13T11:30:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=89e945be6a84d992fc50d33e50d81c15c1162f25'/>
<id>urn:sha1:89e945be6a84d992fc50d33e50d81c15c1162f25</id>
<content type='text'>
The dynamic message domain was introduced by Richard Purdie with the following patch:
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=a6c48298b17e6a5844b3638b422fe226e3b67b89

(From OE-Core rev: 55a8382e460430dc5ff10755d235d637531d2ae7)

(From OE-Core rev: d08db11fcae91deca10d250430a6f77de47f9080)

Signed-off-by: Samuel Stirtzel &lt;s.stirtzel@googlemail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>oe.data: expand the flags</title>
<updated>2011-05-20T16:34:22+00:00</updated>
<author>
<name>Chris Larson</name>
<email>chris_larson@mentor.com</email>
</author>
<published>2011-03-29T19:53:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4da8c86ca2b376149d425480e11ea1704dbc3ede'/>
<id>urn:sha1:4da8c86ca2b376149d425480e11ea1704dbc3ede</id>
<content type='text'>
(From OE-Core rev: 8b9de6d2ad2d351bbc288cbb12562806ba8edae2)

Signed-off-by: Chris Larson &lt;chris_larson@mentor.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Implement variable typing (sync from OE)</title>
<updated>2011-05-20T16:34:22+00:00</updated>
<author>
<name>Chris Larson</name>
<email>chris_larson@mentor.com</email>
</author>
<published>2010-11-09T21:48:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e4921fda5b3a18c797acd267f2b1179ac032cd42'/>
<id>urn:sha1:e4921fda5b3a18c797acd267f2b1179ac032cd42</id>
<content type='text'>
This implementation consists of two components:

- Type creation python modules, whose job it is to construct objects of the
  defined type for a given variable in the metadata
- typecheck.bbclass, which iterates over all configuration variables with a
  type defined and uses oe.types to check the validity of the values

This gives us a few benefits:

- Automatic sanity checking of all configuration variables with a defined type
- Avoid duplicating the "how do I make use of the value of this variable"
  logic between its users.  For variables like PATH, this is simply a split(),
  for boolean variables, the duplication can result in confusing, or even
  mismatched semantics (is this 0/1, empty/nonempty, what?)
- Make it easier to create a configuration UI, as the type information could
  be used to provide a better interface than a text edit box (e.g checkbox for
  'boolean', dropdown for 'choice')

This functionality is entirely opt-in right now.  To enable the configuration
variable type checking, simply INHERIT += "typecheck".  Example of a failing
type check:

BAZ = "foo"
BAZ[type] = "boolean"

$ bitbake -p
FATAL: BAZ: Invalid boolean value 'foo'
$

Examples of leveraging oe.types in a python snippet:

PACKAGES[type] = "list"

python () {
    import oe.data
    for pkg in oe.data.typed_value("PACKAGES", d):
        bb.note("package: %s" % pkg)
}

LIBTOOL_HAS_SYSROOT = "yes"
LIBTOOL_HAS_SYSROOT[type] = "boolean"

python () {
    import oe.data
    assert(oe.data.typed_value("LIBTOOL_HAS_SYSROOT", d) == True)
}

(From OE-Core rev: a04ce490e933fc7534db33f635b025c25329c564)

Signed-off-by: Chris Larson &lt;chris_larson@mentor.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
