From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6520143438976909312 X-Received: by 10.46.115.19 with SMTP id o19mr255424ljc.24.1518201725183; Fri, 09 Feb 2018 10:42:05 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.25.239.27 with SMTP id n27ls174904lfh.2.gmail; Fri, 09 Feb 2018 10:42:04 -0800 (PST) X-Google-Smtp-Source: AH8x2242jYfMXi6TE/zQ0B1PRg6Src/zk8TN1BpEjRiXxqE4OxROD/hCXgqZxVjWywTAjpgtIBKO X-Received: by 10.25.80.80 with SMTP id z16mr299261lfj.34.1518201724676; Fri, 09 Feb 2018 10:42:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518201724; cv=none; d=google.com; s=arc-20160816; b=iaIKdeG71mUM2tbbrYZ17emSAuWTk424HTkQZmqdCNB4mPnOM0hFz68pqbNd2b/M8m 4SX7nA3jfhJ/KY4IYI15qzzRCQEwCtT6xX2KSTOhVRPl9GO9QQ2xEOJoTxtQFMWe3SMM b8dygXiznMJJAVtMocwXgmgzP1stHkHiXBEZdzscSN1Ac8B5YeUpBgI766za9ncGZAVS QPvSfvLIJPXVgucOpVPz1WbUDJMeriXXdL67hv6yltWsCNNV7+emW2TYd1VST6CqkuhZ vEUluutD5IfU33RCcS7sXYCV8mKQJffNIoMvEIg2jDqHfsrxY7FDO5LoWtow6h8KLO1o WzmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:subject:user-agent :references:in-reply-to:message-id:date:cc:to:from :arc-authentication-results; bh=T8gtjbpH0llcy1B00b0R/SC6+kdnqI1ttij2xRfgidY=; b=zr0RvZeAm5MmIbiKb5wIkhhhZkmOToylcnH/FiG4zkkZ4+BsdbX+vK7nn8DWu8bDY6 HKbs6SdMvkHpf1eXV8ZAhzBbbwWg1tx5GcVjXjmXYaU//QsbXdSpFYO3Q8C47LMZiVUu +rl1VBuzkw6MtmdTdx3+OnMCwfpkGRhMZ6XOS3lGemhio/it360CLdGsiX/B64eFpC2P 6NvC2EtTsKm0LOKEEmdzp6rPPXRzUiHGru0ZywcVn0al0eRhUMogjiigcXm8tvDpDa5J sgeP9EGs2SStMMLTRsgAjZ0L947AFRjh4hrMpsTz7EwYa7q8KT0hY0LlMkhQGDOi8ZT4 Bang== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id l30si170220ljb.3.2018.02.09.10.42.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Feb 2018 10:42:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from [192.168.1.235] ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w19IfxAX016773; Fri, 9 Feb 2018 19:42:01 +0100 From: Alexander Smirnov To: Henning Schild CC: , Claudius Heine Date: Fri, 09 Feb 2018 21:42:12 +0300 Message-ID: <1617bdffba0.27ac.034a6b0541ed39b7fb4e17f4ac219eaa@ilbers.de> In-Reply-To: <20180209191610.161916ad@mmd1pvb1c.ad001.siemens.net> References: <20180209172850.28852-1-asmirnov@ilbers.de> <20180209191610.161916ad@mmd1pvb1c.ad001.siemens.net> User-Agent: AquaMail/1.10.0-403 (build: 101000001) Subject: Re: [PATCH v2] meta/classes/base: Fix showdata and liststasks after bitbake update MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8" Content-Transfer-Encoding: 8bit X-TUID: Q4i1P/4hwAGR Henning Schild 9 февраля 2018 г. 21:16:17 написал: > Mhh this one rings a bell ;) > > https://groups.google.com/d/msg/isar-users/Raq3ayrqtnc/oqTt6_sSBQAJ > > Someone has to reread that and check whether my symlink approach was > rejected rightfully, or whether it was just one of the many > misunderstandings we had in the past. This approach was rejected due to several reasons: - According to the bitbake documentation, you need to create your own base.bbclass. I consider this as a signal - do not reply on default one. https://www.yoctoproject.org/docs/1.6/bitbake-user-manual/bitbake-user-manual.html#hello-world-example - Default base.bbclass provides inevitable default settings that should be overwritten in custom class. Moreover this class should be included to *all* the Isar recipes manually. Inherit something to overwrite it immediately still doesn't look reasonable for me. In addition: - do_listtasks in this patch seems to be taken from oe-core, not from bitbake, so inheritance doesn't help here. Alex > > Henning > > Am Fri, 9 Feb 2018 20:28:50 +0300 > schrieb Alexander Smirnov : > >> From: Claudius Heine >> >> 8<-- >> >> Just added references to origin code in comment. Didn't touch the >> code. >> >> 8<-- >> >> Those tasks were broken, this patchs fixes by implementing them >> similar to how openembedded-core does it. >> >> Signed-off-by: Claudius Heine >> --- >> meta/classes/base.bbclass | 30 +++++++++++++++++++----------- >> 1 file changed, 19 insertions(+), 11 deletions(-) >> >> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass >> index 7d44f72..ae84677 100644 >> --- a/meta/classes/base.bbclass >> +++ b/meta/classes/base.bbclass >> @@ -37,25 +37,33 @@ bbfatal() { >> exit 1 >> } >> >> +# Derived from bitbake: bitbake/classes/base.bbclass >> 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))) } >> >> +# Derived from Open Embedded: >> openembedded-core/meta/classes/utility-tasks.bbclass 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}" > -- With best regards, Alexander Smirnov ilbers GmbH Baierbrunner Str. 28c D-81379 Munich +49 (89) 122 67 24-0 http://ilbers.de/ Commercial register Munich, HRB 214197 General manager: Baurzhan Ismagulov