public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH 0-10 of 16 v2 1/8] meta: classes: use base.bbclass from bitbake
Date: Tue, 8 Aug 2017 16:15:43 +0200	[thread overview]
Message-ID: <20170808161543.0a81c6fc@md1em3qc> (raw)
In-Reply-To: <CAJmB2rDssdJMA1BsFRxBhq_5Ju+uUa=fWcRth1jX2Yj08ocuaw@mail.gmail.com>

Am Tue, 8 Aug 2017 17:02:19 +0300
schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:

> 2017-08-08 11:43 GMT+03:00 Henning Schild
> <henning.schild@siemens.com>:
> 
> > Am Mon, 7 Aug 2017 22:18:36 +0300
> > schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:
> >  
> > > Hi again,
> > >
> > > it looks like this patch doesn't work for Isar. 'base.bbclass' is
> > > the one which is included by default to any bitbake operation. In
> > > the default 'base.bbclass' there is one very bad line:
> > >
> > > bitbake/classes/base.bbclass:
> > > 51: do_build[nostamp] = "1"
> > >
> > > This line disables stamps for build tasks, it completely destroys
> > > the pipeline. In your patch you move the line: do_build[nostamp]
> > > = "0" to 'isar-base.bbclass'. But to have this construction
> > > working you have to explicitely include this class to *every*
> > > recipe in Isar, what looks for me as huge overhead.  
> >
> > Ok i did not know what that line does but since i moved it to
> > isar-base and every class and recipe includes that, the semantics
> > is kept.
> >
> > Making sure local changes are always included is less of a problem
> > than copying files from bitbake and ending up with an outdated copy
> > again. 
> 
> We are speaking about sample base class in bitbake tree which by
> default provides *nothing*. As I can understand, this is just an
> example which doesn't affect the bitbake functionality. Nor OE, nor
> Yocto doesn't use it and implement their own base classes. Also in
> bitbake manual:
> https://www.yoctoproject.org/docs/1.6/bitbake-user-manual/bitbake-user-manual.html
> chapter A4, document proposes you to create your base class.
> 
> I was OK with this idea because I assumed that the deafult base class
> provides correct settings, but now I realized that it doesn't. So
> keeping broken base class for some reasons and overwrite it in
> run-time looks too compicated for such simple things.
> 
> 
> > Every recipe in isar will probably include dpdk-bin or dpdk-src,
> > which both inherit isar-base. The images also include isar-base.
> >  
> 
> It's not a question about workaround. It's about knowingly keeping of
> broken base class and fix it from another class. Meanwhile nothing is
> used from original base class. I don't really understand why we need
> base class then...

It provides 'listtasks' and 'showdata' they never used to work but are
handy now that they do. And the logging functions ...

Henning

> Alex
> 
> 
> >
> > Henning
> >  
> > > 2017-08-03 14:55 GMT+03:00 Henning Schild
> > > <henning.schild@siemens.com>:
> > >  
> > > > 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 <henning.schild@siemens.com>
> > > > ---
> > > >  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.bbcla ss
> > > > 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
> > > >
> > > >  
> >
> >  


  reply	other threads:[~2017-08-08 14:13 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-03 11:55 [PATCH 0-10 of 16 v2 0/8] splitting the previous q Henning Schild
2017-08-03 11:55 ` [PATCH 0-10 of 16 v2 1/8] meta: classes: use base.bbclass from bitbake Henning Schild
2017-08-07 16:27   ` Alexander Smirnov
2017-08-08  8:52     ` Henning Schild
2017-08-08  9:39       ` Alexander Smirnov
2017-08-09 13:15         ` Henning Schild
2017-08-08 11:40       ` Jan Kiszka
2017-08-07 19:18   ` Alexander Smirnov
2017-08-08  8:43     ` Henning Schild
2017-08-08 14:02       ` Alexander Smirnov
2017-08-08 14:15         ` Henning Schild [this message]
2017-08-03 11:55 ` [PATCH 0-10 of 16 v2 2/8] meta: isar-base: remove unused function Henning Schild
2017-08-07 19:36   ` Alexander Smirnov
2017-08-08  8:05     ` Henning Schild
2017-08-08  9:33       ` Alexander Smirnov
2017-08-08 12:08         ` Henning Schild
2017-08-08 12:29           ` Alexander Smirnov
2017-08-08 13:12             ` Henning Schild
2017-08-08 13:24               ` Alexander Smirnov
2017-08-08 14:21                 ` Henning Schild
2017-08-21 23:05                   ` Baurzhan Ismagulov
2017-08-08 13:47               ` Alexander Smirnov
2017-08-08 14:17                 ` Henning Schild
2017-08-21 22:26   ` Baurzhan Ismagulov
2017-08-03 11:55 ` [PATCH 0-10 of 16 v2 3/8] remove redundant variable THISDIR Henning Schild
2017-08-07 19:30   ` Alexander Smirnov
2017-08-08  8:02     ` Henning Schild
2017-08-03 11:55 ` [PATCH 0-10 of 16 v2 4/8] meta: conf: use bitbake.conf from bitbake and apply local changes Henning Schild
2017-08-07 19:37   ` Alexander Smirnov
2017-08-21 13:25   ` Baurzhan Ismagulov
2017-08-21 18:29     ` Henning Schild
2017-08-22 11:31       ` Baurzhan Ismagulov
2017-08-22 12:45         ` Henning Schild
2017-08-22 15:31           ` Baurzhan Ismagulov
2017-08-22 18:55             ` Henning Schild
2017-08-23 11:31               ` Baurzhan Ismagulov
2017-08-23 11:46                 ` Henning Schild
2017-08-27 23:46                   ` Baurzhan Ismagulov
2017-08-03 11:55 ` [PATCH 0-10 of 16 v2 5/8] meta: conf: clean up local bitbake config Henning Schild
2017-08-07 19:37   ` Alexander Smirnov
2017-08-21 19:55   ` Baurzhan Ismagulov
2017-08-03 11:55 ` [PATCH 0-10 of 16 v2 6/8] classes: move fetch and unpack into isar-base Henning Schild
2017-08-07 19:40   ` Alexander Smirnov
2017-08-08  8:00     ` Henning Schild
2017-08-08  9:30       ` Alexander Smirnov
2017-08-08 12:01         ` Henning Schild
2017-08-21 20:27           ` Baurzhan Ismagulov
2017-08-22  8:19             ` Henning Schild
2017-08-22 10:18               ` Baurzhan Ismagulov
2017-08-22 10:44                 ` Henning Schild
2017-08-03 11:55 ` [PATCH 0-10 of 16 v2 7/8] meta: dpdk use [dirs] directive instead of mkdir Henning Schild
2017-08-07 19:41   ` Alexander Smirnov
2017-08-21 20:33   ` Baurzhan Ismagulov
2017-08-03 11:55 ` [PATCH 0-10 of 16 v2 8/8] meta: dpkg: reorder and rename do_install to install in addtask Henning Schild
2017-08-07 19:41   ` Alexander Smirnov
2017-08-21 20:42   ` Baurzhan Ismagulov
2017-08-07 19:44 ` [PATCH 0-10 of 16 v2 0/8] splitting the previous q Alexander Smirnov
2017-08-08  8:45   ` Henning Schild
2017-08-08  9:43     ` Alexander Smirnov

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=20170808161543.0a81c6fc@md1em3qc \
    --to=henning.schild@siemens.com \
    --cc=alex.bluesman.smirnov@gmail.com \
    --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