From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6443790524544450560 X-Received: by 10.25.39.211 with SMTP id n202mr51531lfn.16.1500374998283; Tue, 18 Jul 2017 03:49:58 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.69.9 with SMTP id s9ls538173wma.14.gmail; Tue, 18 Jul 2017 03:49:58 -0700 (PDT) X-Received: by 10.223.182.169 with SMTP id j41mr80490wre.5.1500374997988; Tue, 18 Jul 2017 03:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500374997; cv=none; d=google.com; s=arc-20160816; b=bai6bPQHmSSFjd+t6W9bfIEblsJpqmPoYXkkT5OPhmcSyKgAshnh7AYC2oPRy2NGCk q07kJ/gKoeTWMBukYw1oKKEEOECT8CEFqEYFiL0LWok4z6PhZyR8faJ8LbbOyAXdhl11 RaHSLZVqtHJ+OtdpPj937pCjmGkORHFLPkQSoIYv4548AB0HWIl4Ty/2vU0yfOJSQtaj HsgMVmD+V0Q/gbO+oGmKWl2hpPAQdqxA1h5WYXGkK22DkFhI9Kd8zeHqZVqY3XEnH50c G2UwRCxQ387PV9jJQlDTfZYdBOKXGeY/XBCxqymZk0PfSOFFb1/D9OsKnGqp4HmKHjUT 1efw== 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:to:from:date:arc-authentication-results; bh=6ojB5+Hbxq+fMTARQJj2Xdhp7Z3fHaQtmLAvKJ5IjdY=; b=mZJMc8qNBPBtSeVN85sej+rooxtPoNJg5wIHKsjZ76PmoSv5Wac9TbXLmHDErH4Pca vLIyNENMYv914hCb0wzrqzhuEqxDOG/cPmn1JF3HpGSStJO/q4onpAkXv1lbEm1hBvBt 9N46Bkal86MghNd0z0OQrdytUq9vH3+IBzjnODRwULPy6NRqR527Y9QJp90Ou0T1PPI1 C8EvrvNqK7TouCoQB4e5jy0ylDiRD4d/mllBt+sogNKgQEe+4PHRFx+JNB0tF8nLPojE E6uPlgtOnCOeL/mjmgv9/1UjGa8Z+bsu9qE1DuATgMwqr83c8WhwwG/Ckl3U2AJDah7z TxCg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.2 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 thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id f140si3973970wme.4.2017.07.18.03.49.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jul 2017 03:49:57 -0700 (PDT) Received-SPF: neutral (google.com: 192.35.17.2 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.35.17.2 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 thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id v6IAnvmV032656 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 18 Jul 2017 12:49:57 +0200 Received: from md1em3qc ([139.25.68.40]) by mail2.siemens.de (8.15.2/8.15.2) with ESMTP id v6IAnvNG012049 for ; Tue, 18 Jul 2017 12:49:57 +0200 Date: Tue, 18 Jul 2017 12:51:45 +0200 From: Henning Schild To: Subject: Re: [PATCH 1/2] meta: classes: use base.bbclass from bitbake Message-ID: <20170718125145.653c5875@md1em3qc> In-Reply-To: <20170717172001.6656-1-henning.schild@siemens.com> References: <20170717172001.6656-1-henning.schild@siemens.com> 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: d3C2ejolg/A+ Same problem for bitbake.conf the outdated/changed version has the same bb.data.getVar vs. d.getVar, which probably breaks all sorts of default variables. I suggest also just using the default via symlink and somehow smuggle in the local changes. Will send patches, but if anyone has had problems with FILE_DIRNAME, FILESDIR etc. those problems can be solved with using the bitbake.conf coming with bitbake. Also THISDIR is not required since it is FILE_DIRNAME, the invention of that new variable suggests that the current bitbake.conf is broken. Henning Am Mon, 17 Jul 2017 19:20:00 +0200 schrieb 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 | 17 +++++++++ > 4 files changed, 22 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 f7ace54..3faa976 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 5652757..4c07b10 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..cbb15b1 > --- /dev/null > +++ b/meta/classes/isar-base.bbclass > @@ -0,0 +1,17 @@ > +inherit base > + > +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"