[OE-core] [PATCHv2] license: fix LICENSE_CREATE_PACKAGE to stay disabled by default
Martin Jansa
martin.jansa at gmail.com
Tue Jan 29 15:59:30 UTC 2013
On Tue, Jan 29, 2013 at 07:29:55AM -0700, Chris Larson wrote:
> On Tue, Jan 29, 2013 at 6:04 AM, Martin Jansa <martin.jansa at gmail.com>wrote:
>
> > * as reported by Enrico on #oe
> > 11:06:50 < ensc|w> JaMa: might this be caused by
> > dc78ef91a2bf01efb8028c9afbe69e506e016265
> > which checks for 'd.getVar('LICENSE_CREATE_PACKAGE', True)' evaluating
> > to 'True' for every
> > string (including the default 0)
> >
> > Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
> > ---
> > meta/classes/license.bbclass | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
> > index d4ebb26..229f755 100644
> > --- a/meta/classes/license.bbclass
> > +++ b/meta/classes/license.bbclass
> > @@ -103,7 +103,7 @@ python do_populate_lic() {
> > # it would be better to copy them in do_install_append, but
> > find_license_filesa is python
> > python perform_packagecopy_prepend () {
> > enabled = d.getVar('LICENSE_CREATE_PACKAGE', True)
> > - if d.getVar('CLASSOVERRIDE', True) == 'class-target' and enabled:
> > + if d.getVar('CLASSOVERRIDE', True) == 'class-target' and enabled ==
> > "1":
>
>
> We do have an existing mechanism for handling boolean variables in a sane
> way, as an FYI.
>
> LICENSE_CREATE_PACKAGE[type] = "boolean"
>
> LICENSE_CREATE_PACKAGE = "1"
> oe.data.typed_value(d, 'LICENSE_CREATE_PACKAGE') == True
> LICENSE_CREATE_PACKAGE = "0"
> oe.data.typed_value(d, 'LICENSE_CREATE_PACKAGE') == False
I did the same and now it's failing with:
AttributeError: 'str' object has no attribute 'getVarFlag'
here is last version
http://bpaste.net/show/73667/
Cheers,
> 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).
>
> 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.
> --
> Christopher Larson
--
Martin 'JaMa' Jansa jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20130129/0d579081/attachment-0002.sig>
More information about the Openembedded-core
mailing list