public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Claudius Heine <claudius.heine.ext@siemens.com>
To: Alexander Smirnov <asmirnov@ilbers.de>, isar-users@googlegroups.com
Cc: Claudius Heine <ch@denx.de>
Subject: Re: [PATCH] meta/classes/base: Fix showdata and liststasks after bitbake update
Date: Thu, 8 Feb 2018 16:40:36 +0100	[thread overview]
Message-ID: <3279048f-9ec4-53a4-93f7-f2acf2463d65@siemens.com> (raw)
In-Reply-To: <26d4eb02-20c1-c6a4-8c7a-f040d4c2d51d@siemens.com>

Hi again,

On 02/08/2018 04:24 PM, [ext] Claudius Heine wrote:
> Hi Alex,
> 
> On 02/08/2018 02:55 PM, Alexander Smirnov wrote:
>> Hi,
>>
>> On 02/08/2018 02:26 PM, claudius.heine.ext@siemens.com wrote:
>>> From: Claudius Heine <ch@denx.de>
>>>
>>> Those tasks were broken, this patchs fixes by implementing them similar
>>> to how openembedded-core does it.
>>>
>>
>> I see that this code is identical to OE one, do you know which 
>> copyright it is? If this code is copied from OE, I think it makes 
>> sense to mention this explicitly in the code.
> 
> Sure, I got it from [1], and this file does not have an own header, so I 
> suppose its MIT or GPLv2. I don't know if this falls under 'metadata' or 
> not. Since Isar uses the same licenses, you might know what exactly is 
> meant by that.

Just randomly read in the bitbake manual that recipes and classes [1] 
are considered metadata, so they would be MIT and naming authors would 
not be needed in this case.

Cheers,
Claudius

[1] 
https://www.yoctoproject.org/docs/latest/bitbake-user-manual/bitbake-user-manual.html#bitbake-style-python-functions-versus-python-functions 
(second note box)

> 
> How are you proposing to name the authors?
> 
> Cheers,
> Claudius
> 
> [1] 
> http://git.openembedded.org/openembedded-core/tree/meta/classes/utility-tasks.bbclass 
> 
> 
>>
>> Alex
>>
>>> Signed-off-by: Claudius Heine <ch@denx.de>
>>> ---
>>>   meta/classes/base.bbclass | 28 +++++++++++++++++-----------
>>>   1 file changed, 17 insertions(+), 11 deletions(-)
>>>
>>> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
>>> index 7d44f72..448dd67 100644
>>> --- a/meta/classes/base.bbclass
>>> +++ b/meta/classes/base.bbclass
>>> @@ -40,22 +40,28 @@ bbfatal() {
>>>   addtask showdata
>>>   do_showdata[nostamp] = "1"
>>>   python do_showdata() {
>>> -    import sys
>>> -    # emit variables and shell functions
>>> -    bb.data.emit_env(sys.__stdout__, d, True)
>>> -    # emit the metadata which isnt valid shell
>>> -    for e in bb.data.keys(d):
>>> -        if bb.data.getVarFlag(e, 'python', d):
>>> -            sys.__stdout__.write("\npython %s () {\n%s}\n" % (e, 
>>> bb.data.getVar(e, d, 1)))
>>> +    for e in d.keys():
>>> +        if d.getVarFlag(e, 'python'):
>>> +            bb.plain("\npython %s () {\n%s}\n" % (e, d.getVar(e, 
>>> True)))
>>>   }
>>>   addtask listtasks
>>>   do_listtasks[nostamp] = "1"
>>>   python do_listtasks() {
>>> -    import sys
>>> -    for e in bb.data.keys(d):
>>> -        if bb.data.getVarFlag(e, 'task', d):
>>> -            sys.__stdout__.write("%s\n" % e)
>>> +    taskdescs = {}
>>> +    maxlen = 0
>>> +    for e in d.keys():
>>> +        if d.getVarFlag(e, 'task'):
>>> +            maxlen = max(maxlen, len(e))
>>> +            if e.endswith('_setscene'):
>>> +                desc = "%s (setscene version)" % 
>>> (d.getVarFlag(e[:-9], 'doc') or '')
>>> +            else:
>>> +                desc = d.getVarFlag(e, 'doc') or ''
>>> +            taskdescs[e] = desc
>>> +
>>> +    tasks = sorted(taskdescs.keys())
>>> +    for taskname in tasks:
>>> +        bb.plain("%s  %s" % (taskname.ljust(maxlen), 
>>> taskdescs[taskname]))
>>>   }
>>>   do_fetch[dirs] = "${DL_DIR}"
>>>
> 

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de

  reply	other threads:[~2018-02-08 15:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-08 11:26 claudius.heine.ext
2018-02-08 13:55 ` Alexander Smirnov
2018-02-08 15:24   ` Claudius Heine
2018-02-08 15:40     ` Claudius Heine [this message]
2018-02-08 15:47     ` Alexander Smirnov
2018-02-08 16:13       ` Jan Kiszka
2018-02-08 16:18         ` Jan Kiszka

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=3279048f-9ec4-53a4-93f7-f2acf2463d65@siemens.com \
    --to=claudius.heine.ext@siemens.com \
    --cc=asmirnov@ilbers.de \
    --cc=ch@denx.de \
    --cc=isar-users@googlegroups.com \
    /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