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.

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/7c03d914f33ef0563cb7af2951f56e8cd5fd20bc.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