From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6520143438976909312 X-Received: by 10.223.184.42 with SMTP id h39mr166083wrf.4.1518104442381; Thu, 08 Feb 2018 07:40:42 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.170.1 with SMTP id t1ls1068057wme.7.gmail; Thu, 08 Feb 2018 07:40:41 -0800 (PST) X-Google-Smtp-Source: AH8x227EvqpCK5GTUrIoZOStAG8e9NQEYNomHwnX0e8oIBQhGH3O1krqMJEaeBM9t7PR06hqFnzY X-Received: by 10.28.52.133 with SMTP id b127mr188029wma.13.1518104441906; Thu, 08 Feb 2018 07:40:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518104441; cv=none; d=google.com; s=arc-20160816; b=myAPrL3VyKVzaBLJbf+aLMCoErkLn6DHgoUio+1dSw3v7j8wTfn2aoHCenVBOadKN9 NEo60Tj+BZDa/CIzX0Zmz5/ifZfHdqY0UQf7tRNeQiyz7fOWj0Rn8DxZo7HPtEAXo3VM WSpZvW4xG0g5LqM7SQLXdkBYysx7LkydKX2nsd/SRGquvbSZbOF37CoTbZnVDpKPUddg 5QzpxDre2mVWYXtv+pLsEQx7W4HubgAVwKDwtZSENUM0ltlWnlrhZ3kJ3Nwy3ueIQl8Y /suOmT5ZhwyUf3HpW4v+A4SWFKZwfm3eySwyWkRfdfQh3tU7SK/b2sP7UDZXDw8qO8Al Ja9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:references:cc:to:from:subject :arc-authentication-results; bh=dRp7navRzrH4yPqrwxwuyZxZoO4Y4bJxbxEEeVgurPA=; b=Y2oq6EOKM1/wo5eBHeZQ9yQuRJKrOxmaxV8wfjHUocsLEDJ6uqOTEEG1ilm5KPD1wA O5psKns1ZpARViGduJzurRYVCXbqj8QeoXnUUlW81mctSz2rScAjrnFfgJA8cKT3lu/g KtdhW1pagshJWT8bQzM5ZK3sF/vVqHUGrbpEFCKIZ5gvxkm3Euk2b8QYd6mjNkHh/flx 8VqtCcowyV0x8KM0oX9NtkkPwUQ3jNuq88HeyCFvIxnahuQfyOibeP5+Y8aoAzS3RsYd pnqzVJLmnKTlHNmreibvhaJjjj71iRqYfq/ZTpPzTfavbRwo7duYIM57a6OWt3ZkDsmm 0TuA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id a12si28966wmg.4.2018.02.08.07.40.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Feb 2018 07:40:41 -0800 (PST) Received-SPF: pass (google.com: domain of claudius.heine.ext@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id w18FeaU3011708 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 8 Feb 2018 16:40:36 +0100 Received: from [139.25.68.223] (linux-ses-ext02.ppmd.siemens.net [139.25.68.223]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id w18FeaGC006188; Thu, 8 Feb 2018 16:40:36 +0100 Subject: Re: [PATCH] meta/classes/base: Fix showdata and liststasks after bitbake update From: Claudius Heine To: Alexander Smirnov , isar-users@googlegroups.com Cc: Claudius Heine References: <20180208112622.3373-1-claudius.heine.ext@siemens.com> <26d4eb02-20c1-c6a4-8c7a-f040d4c2d51d@siemens.com> Message-ID: <3279048f-9ec4-53a4-93f7-f2acf2463d65@siemens.com> Date: Thu, 8 Feb 2018 16:40:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <26d4eb02-20c1-c6a4-8c7a-f040d4c2d51d@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: qh/APGSIJrOg 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 >>> >>> 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 >>> --- >>>   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