<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 29, 2013 at 6:04 AM, Martin Jansa <span dir="ltr"><<a href="mailto:martin.jansa@gmail.com" target="_blank">martin.jansa@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">* as reported by Enrico on #oe<br>
11:06:50 < ensc|w> JaMa: might this be caused by dc78ef91a2bf01efb8028c9afbe69e506e016265<br>
which checks for 'd.getVar('LICENSE_CREATE_PACKAGE', True)' evaluating to 'True' for every<br>
string (including the default 0)<br>
<br>
Signed-off-by: Martin Jansa <<a href="mailto:Martin.Jansa@gmail.com">Martin.Jansa@gmail.com</a>><br>
---<br>
meta/classes/license.bbclass | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass<br>
</div>index d4ebb26..229f755 100644<br>
<div class="im">--- a/meta/classes/license.bbclass<br>
+++ b/meta/classes/license.bbclass<br>
@@ -103,7 +103,7 @@ python do_populate_lic() {<br>
# it would be better to copy them in do_install_append, but find_license_filesa is python<br>
python perform_packagecopy_prepend () {<br>
enabled = d.getVar('LICENSE_CREATE_PACKAGE', True)<br>
- if d.getVar('CLASSOVERRIDE', True) == 'class-target' and enabled:<br>
</div>+ if d.getVar('CLASSOVERRIDE', True) == 'class-target' and enabled == "1":</blockquote></div><br>We do have an existing mechanism for handling boolean variables in a sane way, as an FYI.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">LICENSE_CREATE_PACKAGE[type] = "boolean"</div><div class="gmail_extra"><br></div><div class="gmail_extra" style>LICENSE_CREATE_PACKAGE = "1"</div>
<div class="gmail_extra">oe.data.typed_value(d, 'LICENSE_CREATE_PACKAGE') == True<br><div class="gmail_extra">LICENSE_CREATE_PACKAGE = "0"</div><div>oe.data.typed_value(d, 'LICENSE_CREATE_PACKAGE') == False</div>
<div><br></div><div style>Available types: boolean, integer (with support for different bases), float (with support for hexadecimal floating point values), regex, choice (which lets you only allow from a set of possible string values), list (which does the (d.getVar() or "").split() crap for you).</div>
<div style><br></div><div style>You can also INHERIT += "type_check", and you'll know immediately at ConfigParsed time if any of the values are invalid for their specified types.</div>-- <br>Christopher Larson</div>
</div>