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 6/8] classes: move fetch and unpack into isar-base
Date: Tue, 8 Aug 2017 14:01:50 +0200 [thread overview]
Message-ID: <20170808140150.17be7599@md1em3qc> (raw)
In-Reply-To: <CAJmB2rAtvF6QmRKyL_uwKmrp+DCh326EAXW-oVC3He8QYeXgVQ@mail.gmail.com>
Am Tue, 8 Aug 2017 12:30:46 +0300
schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:
> 2017-08-08 11:00 GMT+03:00 Henning Schild
> <henning.schild@siemens.com>:
>
> > Am Mon, 7 Aug 2017 22:40:55 +0300
> > schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:
> >
> > > 2017-08-03 14:55 GMT+03:00 Henning Schild
> > > <henning.schild@siemens.com>:
> > >
> > > > That way we can use the fetchers in images and future
> > > > classes/recipes without having to "inherit dpdk".
> > > >
> > > > Signed-off-by: Henning Schild <henning.schild@siemens.com>
> > > > ---
> > > > meta/classes/dpkg.bbclass | 38
> > > > ++---------------------------- --------
> > > > meta/classes/isar-base.bbclass | 33
> > > > +++++++++++++++++++++++++++++++++ 2 files changed, 35
> > > > insertions(+), 36 deletions(-)
> > > >
> > > > diff --git a/meta/classes/dpkg.bbclass
> > > > b/meta/classes/dpkg.bbclass index 3d7aafb..e334dda 100644
> > > > --- a/meta/classes/dpkg.bbclass
> > > > +++ b/meta/classes/dpkg.bbclass
> > > > @@ -11,44 +11,10 @@ do_unpack[deptask] = "do_build"
> > > > # recipe name as identifier
> > > > PP = "/home/builder/${PN}"
> > > > BUILDROOT = "${BUILDCHROOT_DIR}/${PP}"
> > > > -
> > > > -do_fetch[dirs] = "${DL_DIR}"
> > > > -
> > > > -# Fetch package from the source link
> > > > -python do_fetch() {
> > > > - src_uri = (d.getVar('SRC_URI', True) or "").split()
> > > > - if len(src_uri) == 0:
> > > > - return
> > > > -
> > > > - try:
> > > > - fetcher = bb.fetch2.Fetch(src_uri, d)
> > > > - fetcher.download()
> > > > - except bb.fetch2.BBFetchException as e:
> > > > - raise bb.build.FuncFailed(e)
> > > > -}
> > > > -
> > > > -addtask fetch before do_build
> > > > -
> > > > -do_unpack[dirs] = "${BUILDROOT}"
> > > > -do_unpack[stamp-extra-info] = "${DISTRO}"
> > > > S ?= "${BUILDROOT}"
> > > >
> > > > -# Unpack package and put it into working directory in
> > > > buildchroot -python do_unpack() {
> > > > - src_uri = (d.getVar('SRC_URI', True) or "").split()
> > > > - if len(src_uri) == 0:
> > > > - return
> > > > -
> > > > - rootdir = d.getVar('BUILDROOT', True)
> > > > -
> > > > - try:
> > > > - fetcher = bb.fetch2.Fetch(src_uri, d)
> > > > - fetcher.unpack(rootdir)
> > > > - except bb.fetch2.BBFetchException as e:
> > > > - raise bb.build.FuncFailed(e)
> > > > -}
> > > > -
> > > > -addtask unpack after do_fetch before do_build
> > > > +# make the unpacker extract to BUILDROOT
> > > > +WORKDIR_task-unpack = "${BUILDROOT}"
> >
> > This is where we force the unpacker to use BUILDROOT instead of
> > WORKDIR. We did not finish the discussion on why we need to break
> > out of WORKDIR in the first place.
>
>
> I only mean, that in patch you mention "move", by move I understand
> "copy-paste". This this should be done in two steps: 1. modify, 2.
> move.
Ok. If you want me to turn it into two commits i will do so. But please
tell me what to do.
Especially since i would not know which branch to rebase on now that
you even split my patches.
Henning
> Alex
>
> >
> > > > do_build[stamp-extra-info] = "${DISTRO}"
> > > >
> > > > diff --git a/meta/classes/isar-base.bbclass
> > > > b/meta/classes/isar-base. bbclass
> > > > index d860937..ec4272f 100644
> > > > --- a/meta/classes/isar-base.bbclass
> > > > +++ b/meta/classes/isar-base.bbclass
> > > > @@ -20,3 +20,36 @@
> > > > # OTHER DEALINGS IN THE SOFTWARE.
> > > >
> > > > do_build[nostamp] = "0"
> > > > +
> > > > +# Fetch package from the source link
> > > > +python do_fetch() {
> > > > + src_uri = (d.getVar('SRC_URI', True) or "").split()
> > > > + if len(src_uri) == 0:
> > > > + return
> > > > +
> > > > + try:
> > > > + fetcher = bb.fetch2.Fetch(src_uri, d)
> > > > + fetcher.download()
> > > > + except bb.fetch2.BBFetchException as e:
> > > > + raise bb.build.FuncFailed(e)
> > > > +}
> > > > +
> > > > +addtask fetch before do_build
> > > > +do_fetch[dirs] = "${DL_DIR}"
> > > > +
> > > > +# Unpack package and put it into working directory in
> > > > buildchroot +python do_unpack() {
> > > > + src_uri = (d.getVar('SRC_URI', True) or "").split()
> > > > + if len(src_uri) == 0:
> > > > + return
> > > > +
> > > > + try:
> > > > + fetcher = bb.fetch2.Fetch(src_uri, d)
> > > > + fetcher.unpack(d.getVar('WORKDIR', True))
> > > > + except bb.fetch2.BBFetchException as e:
> > > > + raise bb.build.FuncFailed(e)
> > > > +}
> > > > +
> > > > +addtask unpack after do_fetch before do_build
> > > > +do_unpack[dirs] = "${WORKDIR}"
> > > > +do_unpack[stamp-extra-info] = "${DISTRO}"
> > > > --
> > > > 2.13.0
> > > >
> > > > --
> > > > You received this message because you are subscribed to the
> > > > Google Groups "isar-users" group.
> > > > To unsubscribe from this group and stop receiving emails from
> > > > it, send an email to isar-users+unsubscribe@googlegroups.com.
> > > > To post to this group, send email to
> > > > isar-users@googlegroups.com. To view this discussion on the web
> > > > visit https://groups.google.com/d/
> > > > msgid/isar-users/7c03d914f33ef0563cb7af2951f56e
> > 8cd5fd20bc.1501760818.git.
> > > > henning.schild%40siemens.com. For more options, visit
> > > > https://groups.google.com/d/optout.
> > >
> > >
> > > This patch doesn't really do the things mentioned in commit
> > > message, because you change the variables, for example:
> > > do_unpack[dirs] = "${WORKDIR}", so it's not only about moving,
> > > but also some reworking which is unclear for me.
> > >
> > > I've partially apply it (only fetch) to asmirnov/next
> >
> >
next prev parent reply other threads:[~2017-08-08 11:59 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
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 [this message]
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=20170808140150.17be7599@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