public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Chris Larson <clarson@kergoth.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCHv2] license: fix LICENSE_CREATE_PACKAGE to stay disabled by default
Date: Tue, 29 Jan 2013 16:59:30 +0100	[thread overview]
Message-ID: <20130129155930.GQ16904@jama.palm1.palmone.com> (raw)
In-Reply-To: <CABcZANnz3b5W056P3NX0HktHfOrbE-Mu+88izcQtrTpaUnyszA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2267 bytes --]

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@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@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@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

  parent reply	other threads:[~2013-01-29 16:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29 12:37 [PATCH] license: fix LICENSE_CREATE_PACKAGE to stay disabled by default Martin Jansa
2013-01-29 12:57 ` Otavio Salvador
2013-01-29 13:04 ` [PATCHv2] " Martin Jansa
2013-01-29 14:29   ` Chris Larson
2013-01-29 14:58     ` Martin Jansa
2013-01-29 15:59     ` Martin Jansa [this message]
2013-01-29 17:30       ` Chris Larson
2013-01-29 21:17 ` [PATCHv3] " Martin Jansa

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=20130129155930.GQ16904@jama.palm1.palmone.com \
    --to=martin.jansa@gmail.com \
    --cc=clarson@kergoth.com \
    --cc=openembedded-core@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