From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6449247987863388160 X-Received: by 10.28.11.144 with SMTP id 138mr992995wml.23.1502284430694; Wed, 09 Aug 2017 06:13:50 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.77.67 with SMTP id a64ls846547ljb.48.gmail; Wed, 09 Aug 2017 06:13:50 -0700 (PDT) X-Received: by 10.46.20.76 with SMTP id 12mr834381lju.3.1502284430129; Wed, 09 Aug 2017 06:13:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502284430; cv=none; d=google.com; s=arc-20160816; b=qKvA3tPN48J7InG7z3KEToGQmqKm6XpTr7JKo7KvdwQZ2x5NgOJAn0zrn5hmrjTHb2 F84bYdhP0zZslbhfh1H3nPbqOXfOGkovLIJKzB9/jPvwGZ6B+CUU/JbVyS8opi/w78vG u453v9LF+3kFnWfcKRV5R8ASWTeolpu+QvaNGMwSbJDEdAUw/unpV1Qfu1rhGAE8gt58 EbwoK6R2kD07TGaZyvJYQyn767p5Zyu78pcp7trZdhi1Jcyehnx2U7bBuIY3mz2XJ/Cq NsXy1714GXE9XZhz+g9xLc83X0y56AfxWtM5/28znKjb/zf80C5dcLhwwmt4qh/7ReaI 8pJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=mLZjg68tERX0k4lwJncWIE5fa7q5T28QHdfDB3gzj1c=; b=z9KnumW3y9i6CuHJC6sYMEo2quaTgaMDWyYC0Ht3FEnVC5XTPd2xaQUg2dXoTH/mQ8 j5UIBOwhl8MjN+3qXTDG5Zwv7a6HDeVr429esyUwCWeHC5PsdQj4pYXHs2G6MC1rQMyB mLcYtq7JK5QTmq6RwJvWdxv6HgFH13HfkXN80iMhgvrNGqEjdaqkO0jOUawjEY+ARqfO hBEeUlfff/SOxyvWRDsKr73TyN2c0MImjQHicvzwxXE2O4McyBRVjrazOwolfTijdB3E NP/pHXetIGe6YQfr+6EUO53ymHx7mO11KSeutstVkSAQB7fss+uBZffWhdPgp/s9FhBo pffg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.28 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id 187si1004439wmj.0.2017.08.09.06.13.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Aug 2017 06:13:50 -0700 (PDT) Received-SPF: neutral (google.com: 192.35.17.28 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.35.17.28 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) smtp.mailfrom=henning.schild@siemens.com Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id v79DDnMZ026419 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 9 Aug 2017 15:13:49 +0200 Received: from md1em3qc ([139.25.68.40]) by mail2.siemens.de (8.15.2/8.15.2) with ESMTP id v79DDnLN002591; Wed, 9 Aug 2017 15:13:49 +0200 Date: Wed, 9 Aug 2017 15:15:46 +0200 From: Henning Schild To: Alexander Smirnov Cc: Subject: Re: [PATCH 0-10 of 16 v2 1/8] meta: classes: use base.bbclass from bitbake Message-ID: <20170809151546.0d10b37d@md1em3qc> In-Reply-To: References: <87549e3e12d5e4f2ee2464ba0e47cfe3b1d91284.1501760818.git.henning.schild@siemens.com> <20170808105229.2049262b@md1em3qc> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: bzGs0/2oiQKv Am Tue, 8 Aug 2017 12:39:47 +0300 schrieb Alexander Smirnov : > 2017-08-08 11:52 GMT+03:00 Henning Schild > : > > > Am Mon, 7 Aug 2017 19:27:43 +0300 > > schrieb Alexander Smirnov : > > > > > Hi Henning, > > > > > > thank you for the series! I'm trying to build Isar with your > > > patches but got an error: > > > > Thanks for merging some of the stuff! > > > > > ERROR: buildchroot-1.0-r0 do_build: Build of do_build failed > > > ERROR: buildchroot-1.0-r0 do_build: Traceback (most recent call > > > last): File > > > "/home/asmirnov/Work/isar/isar/bitbake/lib/bb/data_smart.py", > > > line 388, in expandWithRefs s = > > > __expand_python_regexp__.sub(varparse.python_sub, s) File > > > "/home/asmirnov/Work/isar/isar/bitbake/lib/bb/data_smart.py", > > > line 138, in python_sub value = utils.better_eval(codeobj, > > > DataContext(self.d), {'d' : self.d}) > > > > > > > > > File "/home/asmirnov/Work/isar/isar/bitbake/lib/bb/utils.py", > > > line 424, in better_eval > > > > > > return eval(source, ctx, locals) > > > > > > > > > File "FILESDIR", line 1, in > > > > > > > > > AttributeError: 'module' object has no attribute 'which' > > > > > > > > > > > > The above exception was the direct cause of the following > > > exception: ... > > > > > > From the internet I got that this problem caused by old python > > > which doesn have 'which' method in 'module' object. > > > Which python version do you use? My version is python 3.4.2 - > > > this is standard one for Debian-8. > > > > I am using 3.4.2 in a Debian-8 container, it just contains a few > > Debian-9 packages to fix multistrap host-leakage. > > Docker: jankiszka/kas-isar/base > > > > Maybe we build it differently? Could you try the unmodified q on > > master as well? > > Well it can not be connected to your python version. What should be called is bb.utils.which and that is implemented in bitabake/lib/bb/utils.py:914 And not anything from python core. I guess that python is fine and something else is borked. Can you use any of the other bb.utils in a simple task? Henning > What I've tried: > > 1. I have clean Debian-8 in chroot with python 3.4.2 installed. > 2. The current master at github.com works good. > 3. The paster with your series applied (without any changes from my > side) - fails with the error mentioned in this mail. > 4. To build I use the following command: bitbake > multiconfig:qemuarm-wheezy:isar-image-base > > Could you please send the list of python plugins installed? > > Alex > > > > > 2017-08-03 14:55 GMT+03:00 Henning Schild > > > : > > > > > > > Do not use our own copy of that class and move local deviations > > > > into isar-base. That also fixes the default tasks "showdata" and > > > > "listtasks", which probably never worked. > > > > > > > > Signed-off-by: Henning Schild > > > > --- > > > > meta/classes/base.bbclass | 81 > > > > +----------------------------- ------------ > > > > meta/classes/dpkg.bbclass | 2 ++ > > > > meta/classes/ext4-img.bbclass | 2 ++ > > > > meta/classes/isar-base.bbclass | 36 +++++++++++++++++++ > > > > 4 files changed, 41 insertions(+), 80 deletions(-) > > > > mode change 100644 => 120000 meta/classes/base.bbclass > > > > create mode 100644 meta/classes/isar-base.bbclass > > > > > > > > diff --git a/meta/classes/base.bbclass > > > > b/meta/classes/base.bbclass deleted file mode 100644 > > > > index 48b6bac..0000000 > > > > --- a/meta/classes/base.bbclass > > > > +++ /dev/null > > > > @@ -1,80 +0,0 @@ > > > > -# Copyright (C) 2003 Chris Larson > > > > -# > > > > -# Permission is hereby granted, free of charge, to any person > > > > obtaining a -# copy of this software and associated > > > > documentation files (the "Software"), > > > > -# to deal in the Software without restriction, including > > > > without limitation > > > > -# the rights to use, copy, modify, merge, publish, distribute, > > > > sublicense, -# and/or sell copies of the Software, and to permit > > > > persons to whom the -# Software is furnished to do so, subject > > > > to the following conditions: -# > > > > -# The above copyright notice and this permission notice shall > > > > be included -# in all copies or substantial portions of the > > > > Software. -# > > > > -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY > > > > KIND, EXPRESS OR > > > > -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF > > > > MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND > > > > NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT > > > > HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, > > > > WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING > > > > FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# > > > > OTHER DEALINGS IN THE SOFTWARE. - > > > > -THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}" > > > > - > > > > -die() { > > > > - bbfatal "$*" > > > > -} > > > > - > > > > -bbnote() { > > > > - echo "NOTE:" "$*" > > > > -} > > > > - > > > > -bbwarn() { > > > > - echo "WARNING:" "$*" > > > > -} > > > > - > > > > -bbfatal() { > > > > - echo "FATAL:" "$*" > > > > - exit 1 > > > > -} > > > > - > > > > -bbdebug() { > > > > - test $# -ge 2 || { > > > > - echo "Usage: bbdebug level \"message\"" > > > > - exit 1 > > > > - } > > > > - > > > > - test ${@bb.msg.debug_level['default']} -ge $1 && { > > > > - shift > > > > - echo "DEBUG:" $* > > > > - } > > > > -} > > > > - > > > > -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))) > > > > -} > > > > - > > > > -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) > > > > -} > > > > - > > > > -addtask build > > > > -do_build[dirs] = "${TOPDIR}" > > > > -python base_do_build () { > > > > - bb.note("The included, default BB base.bbclass does not > > > > define a useful default task.") > > > > - bb.note("Try running the 'listtasks' task against a .bb > > > > to see what tasks are defined.") > > > > -} > > > > - > > > > -EXPORT_FUNCTIONS do_clean do_mrproper do_build > > > > diff --git a/meta/classes/base.bbclass > > > > b/meta/classes/base.bbclass new file mode 120000 > > > > index 0000000..11fe0a4 > > > > --- /dev/null > > > > +++ b/meta/classes/base.bbclass > > > > @@ -0,0 +1 @@ > > > > +../../bitbake/classes/base.bbclass > > > > \ No newline at end of file > > > > diff --git a/meta/classes/dpkg.bbclass > > > > b/meta/classes/dpkg.bbclass index a0446d7..3d7aafb 100644 > > > > --- a/meta/classes/dpkg.bbclass > > > > +++ b/meta/classes/dpkg.bbclass > > > > @@ -1,6 +1,8 @@ > > > > # This software is a part of ISAR. > > > > # Copyright (C) 2015-2016 ilbers GmbH > > > > > > > > +inherit isar-base > > > > + > > > > # Add dependency from buildchroot creation > > > > DEPENDS += "buildchroot" > > > > do_unpack[deptask] = "do_build" > > > > diff --git a/meta/classes/ext4-img.bbclass > > > > b/meta/classes/ext4-img.bbclass index 65d4c11..1486c3e 100644 > > > > --- a/meta/classes/ext4-img.bbclass > > > > +++ b/meta/classes/ext4-img.bbclass > > > > @@ -1,6 +1,8 @@ > > > > # This software is a part of ISAR. > > > > # Copyright (C) 2015-2016 ilbers GmbH > > > > > > > > +inherit isar-base > > > > + > > > > # Extra space for rootfs in MB > > > > ROOTFS_EXTRA ?= "64" > > > > > > > > diff --git a/meta/classes/isar-base.bbclass > > > > b/meta/classes/isar-base. bbclass > > > > new file mode 100644 > > > > index 0000000..67d38a1 > > > > --- /dev/null > > > > +++ b/meta/classes/isar-base.bbclass > > > > @@ -0,0 +1,36 @@ > > > > +# This software is a part of ISAR. > > > > +# Copyright (C) 2017 Siemens AG > > > > +# > > > > +# Permission is hereby granted, free of charge, to any person > > > > obtaining a +# copy of this software and associated > > > > documentation files (the "Software"), > > > > +# to deal in the Software without restriction, including > > > > without limitation > > > > +# the rights to use, copy, modify, merge, publish, distribute, > > > > sublicense, +# and/or sell copies of the Software, and to permit > > > > persons to whom the +# Software is furnished to do so, subject > > > > to the following conditions: +# > > > > +# The above copyright notice and this permission notice shall > > > > be included +# in all copies or substantial portions of the > > > > Software. +# > > > > +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY > > > > KIND, EXPRESS OR > > > > +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF > > > > MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND > > > > NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT > > > > HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, > > > > WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING > > > > FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# > > > > OTHER DEALINGS IN THE SOFTWARE. + > > > > +THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}" > > > > + > > > > +bbdebug() { > > > > + test $# -ge 2 || { > > > > + echo "Usage: bbdebug level \"message\"" > > > > + exit 1 > > > > + } > > > > + > > > > + test ${@bb.msg.debug_level['default']} -ge $1 && { > > > > + shift > > > > + echo "DEBUG:" $* > > > > + } > > > > +} > > > > + > > > > +do_build[nostamp] = "0" > > > > -- > > > > 2.13.0 > > > > > > > > > > > >