From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6449247988281769984 X-Received: by 10.129.81.214 with SMTP id f205mr2360679ywb.210.1502184647425; Tue, 08 Aug 2017 02:30:47 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.36.40.193 with SMTP id h184ls3546748ith.0.gmail; Tue, 08 Aug 2017 02:30:47 -0700 (PDT) X-Received: by 10.101.85.137 with SMTP id j9mr2238009pgs.24.1502184647061; Tue, 08 Aug 2017 02:30:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502184646; cv=none; d=google.com; s=arc-20160816; b=fCSvWu+7ZDiyx5yHgjJrX79IJn115jzIGeokYK9IT5n3/4BIKzk3FsNcC62sbM6MvE ZwCHoxUSVl/F9B0J8uoITZoZ9T4jHXArDC3VzrTXZJWT1+6g3I2DFz7i2Y4ai4iml9js a+h00ZJmiuPz7iSSKnKwnA1Uttnqn4rDQMZYfTPpXeFhUxY0/idcznBfpCYbkoVsvAkh ywtbB7ky+TxSgpPM8FL+kO0uit2WJSyR6UL9ltcgEYFB0K32l2cV3QZn9vB57Y5UfuLh ahOA/aNOyJfHMmy2FLmM+OKtAWsq0wC7urxcQr+GkeUbMPlBvgz1+bN/TOhmj35+CFWk kSBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:dkim-signature:arc-authentication-results; bh=36Ep8TTbK1RXMTZF7i1PW4pyAr9+yayWUyvkepGy5OM=; b=e7y8xJAg7p7C+a82GIUYvrBgJfW2j74xSuCCTEKONQq3T/HzCsNpWKuCXlAqmkevPL rAKTiWeQ113yCyDCgPSKMSk0P/J0DAeO6JkOAZb2LjUK+1AeIsYR4k9U21JQyMVM7zxI MaZTuK3wYVukUzGK6lSVsv9/2gROonGguXApFVbH/4LHZSTwYrTPDyvbSV4kN93G4a4H 24ymQor5wDg9RfnLeb3wlKCQ0J5XSY4RIyvC+u7KCsWssHizh9C+FOwW4ikw+KBsaeWL V8NCLN4ve2xXChud5sBxoXIVG4T3VogXaxRYrtNlYjjvvUhK5iJ3SKHg2Yod4vsg0B7n eEhA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uvM1jvSG; spf=pass (google.com: domain of alex.bluesman.smirnov@gmail.com designates 2607:f8b0:400d:c0d::233 as permitted sender) smtp.mailfrom=alex.bluesman.smirnov@gmail.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-qt0-x233.google.com (mail-qt0-x233.google.com. [2607:f8b0:400d:c0d::233]) by gmr-mx.google.com with ESMTPS id q126si41355ywg.13.2017.08.08.02.30.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Aug 2017 02:30:46 -0700 (PDT) Received-SPF: pass (google.com: domain of alex.bluesman.smirnov@gmail.com designates 2607:f8b0:400d:c0d::233 as permitted sender) client-ip=2607:f8b0:400d:c0d::233; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uvM1jvSG; spf=pass (google.com: domain of alex.bluesman.smirnov@gmail.com designates 2607:f8b0:400d:c0d::233 as permitted sender) smtp.mailfrom=alex.bluesman.smirnov@gmail.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: by mail-qt0-x233.google.com with SMTP id p3so16618628qtg.2 for ; Tue, 08 Aug 2017 02:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=36Ep8TTbK1RXMTZF7i1PW4pyAr9+yayWUyvkepGy5OM=; b=uvM1jvSGz21JcLdVkdAn1OBMUcomeVlUamqYENVr8dD1K16LHwxOPHx/rsM+wuJz/T kYBaL86tPEhh5wnQQJ6Ea/OfzWRnsH6RhiP/zchwNTUW1qeA5elrHuHiaemR5UXAtIst 8/z4jt4Dyyg6NZ2lAQYZ3BF6FYbQdW52/7DqxLIIzfR6sWm643++5waX/TZZxdvSSFz8 XHj+g44i4GDZ7QSuldqu7PcL8G2hXdnGGBGdZmgOjZln8h5CmkI3EGvd8defWqAvKefC qwQIwUFwXsSR2XCos4+VzGXQ2ML0c4D6TexRFlMatoOKkM25gDZlI0qPBMdqYtxA/th3 3Ejg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=36Ep8TTbK1RXMTZF7i1PW4pyAr9+yayWUyvkepGy5OM=; b=kj9BzY6AGVNVXAtr6aeheDrLPHevSygibD6gpZQKhWSCfNcnSFOcl26yqKT4NPqQoL 7TZtDN5yDwo3CF1wdsnVXLkStBa3BgB/LxCB/bsvkCoAPfZptY2zuXQ3LkbSbRKDqkEw zk/Xd4k5LF9L5rSvATvv4w7Q/sunyvTu+IcleKEgNPonyy5zGM8Z0AE8iBO1zDQQ8Ftp HNLwJd2m6oxk46sLxDJ/DY60CHQJf/yT/4crrzN3w+v6j3ssmyzwvQPyMzFb/273bk1F oBejCZv7wDenUd6DW2uz4nCaxMJcldDRWoPSq4rqn5Ca3CD9GqSaykQMvL7rx1GV6o2V IGYA== X-Gm-Message-State: AHYfb5herjHKMPVLvuRcBc7v3vtn3l5EFDVx8EI9A+IX5flcS3Qi+2// HW4W9cuK2uBn/1vYL7s4lUteamvipQ== X-Received: by 10.200.46.118 with SMTP id s51mr4633232qta.48.1502184646732; Tue, 08 Aug 2017 02:30:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.148.188 with HTTP; Tue, 8 Aug 2017 02:30:46 -0700 (PDT) In-Reply-To: <20170808100025.02645738@md1em3qc> References: <7c03d914f33ef0563cb7af2951f56e8cd5fd20bc.1501760818.git.henning.schild@siemens.com> <20170808100025.02645738@md1em3qc> From: Alexander Smirnov Date: Tue, 8 Aug 2017 12:30:46 +0300 Message-ID: Subject: Re: [PATCH 0-10 of 16 v2 6/8] classes: move fetch and unpack into isar-base To: Henning Schild Cc: isar-users@googlegroups.com Content-Type: multipart/alternative; boundary="001a113cf0e44170c905563a9e7f" X-TUID: JRhruoPeEGG0 --001a113cf0e44170c905563a9e7f Content-Type: text/plain; charset="UTF-8" 2017-08-08 11:00 GMT+03:00 Henning Schild : > Am Mon, 7 Aug 2017 22:40:55 +0300 > schrieb Alexander Smirnov : > > > 2017-08-03 14:55 GMT+03:00 Henning Schild > > : > > > > > That way we can use the fetchers in images and future > > > classes/recipes without having to "inherit dpdk". > > > > > > Signed-off-by: Henning Schild > > > --- > > > 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/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 > > --001a113cf0e44170c905563a9e7f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


2017-08-08 11:00 GMT+03:00 Henning Schild <henning.schild@sie= mens.com>:
Am Mon, 7 Aug 20= 17 22:40:55 +0300
schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:

> 2017-08-03 14:55 GMT+03:00 Henning Schild
> <henning.schild@sieme= ns.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>
> > ---
> >=C2=A0 meta/classes/dpkg.bbclass=C2=A0 =C2=A0 =C2=A0 | 38 ++------= ----------------------
> > --------
> >=C2=A0 meta/classes/isar-base.bbclass | 33
> > +++++++++++++++++++++++++++++++++ 2 files changed, 35
> > insertions(+), 36 deletions(-)
> >
> > diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclas= s
> > index 3d7aafb..e334dda 100644
> > --- a/meta/classes/dpkg.bbclass
> > +++ b/meta/classes/dpkg.bbclass
> > @@ -11,44 +11,10 @@ do_unpack[deptask] =3D "do_build" > >=C2=A0 # recipe name as identifier
> >=C2=A0 PP =3D "/home/builder/${PN}"
> >=C2=A0 BUILDROOT =3D "${BUILDCHROOT_DIR}/${PP}"
> > -
> > -do_fetch[dirs] =3D "${DL_DIR}"
> > -
> > -# Fetch package from the source link
> > -python do_fetch() {
> > -=C2=A0 =C2=A0 src_uri =3D (d.getVar('SRC_URI', True) or = "").split()
> > -=C2=A0 =C2=A0 if len(src_uri) =3D=3D 0:
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 return
> > -
> > -=C2=A0 =C2=A0 try:
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 fetcher =3D bb.fetch2.Fetch(src_uri,= d)
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 fetcher.download()
> > -=C2=A0 =C2=A0 except bb.fetch2.BBFetchException as e:
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 raise bb.build.FuncFailed(e)
> > -}
> > -
> > -addtask fetch before do_build
> > -
> > -do_unpack[dirs] =3D "${BUILDROOT}"
> > -do_unpack[stamp-extra-info] =3D "${DISTRO}"
> >=C2=A0 S ?=3D "${BUILDROOT}"
> >
> > -# Unpack package and put it into working directory in buildchroo= t
> > -python do_unpack() {
> > -=C2=A0 =C2=A0 src_uri =3D (d.getVar('SRC_URI', True) or = "").split()
> > -=C2=A0 =C2=A0 if len(src_uri) =3D=3D 0:
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 return
> > -
> > -=C2=A0 =C2=A0 rootdir =3D d.getVar('BUILDROOT', True) > > -
> > -=C2=A0 =C2=A0 try:
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 fetcher =3D bb.fetch2.Fetch(src_uri,= d)
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 fetcher.unpack(rootdir)
> > -=C2=A0 =C2=A0 except bb.fetch2.BBFetchException as e:
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 raise bb.build.FuncFailed(e)
> > -}
> > -
> > -addtask unpack after do_fetch before do_build
> > +# make the unpacker extract to BUILDROOT
> > +WORKDIR_task-unpack =3D "${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 "cop= y-paste". This this should be done in two steps: 1. modify, 2. move.

Alex=C2=A0

> >=C2=A0 do_build[stamp-extra-info] =3D "${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 @@
> >=C2=A0 # OTHER DEALINGS IN THE SOFTWARE.
> >
> >=C2=A0 do_build[nostamp] =3D "0"
> > +
> > +# Fetch package from the source link
> > +python do_fetch() {
> > +=C2=A0 =C2=A0 src_uri =3D (d.getVar('SRC_URI', True) or = "").split()
> > +=C2=A0 =C2=A0 if len(src_uri) =3D=3D 0:
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 return
> > +
> > +=C2=A0 =C2=A0 try:
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 fetcher =3D bb.fetch2.Fetch(src_uri,= d)
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 fetcher.download()
> > +=C2=A0 =C2=A0 except bb.fetch2.BBFetchException as e:
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 raise bb.build.FuncFailed(e)
> > +}
> > +
> > +addtask fetch before do_build
> > +do_fetch[dirs] =3D "${DL_DIR}"
> > +
> > +# Unpack package and put it into working directory in buildchroo= t
> > +python do_unpack() {
> > +=C2=A0 =C2=A0 src_uri =3D (d.getVar('SRC_URI', True) or = "").split()
> > +=C2=A0 =C2=A0 if len(src_uri) =3D=3D 0:
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 return
> > +
> > +=C2=A0 =C2=A0 try:
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 fetcher =3D bb.fetch2.Fetch(src_uri,= d)
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 fetcher.unpack(d.getVar('WO= RKDIR', True))
> > +=C2=A0 =C2=A0 except bb.fetch2.BBFetchException as e:
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 raise bb.build.FuncFailed(e)
> > +}
> > +
> > +addtask unpack after do_fetch before do_build
> > +do_unpack[dirs] =3D "${WORKDIR}"
> > +do_unpack[stamp-extra-info] =3D "${DISTRO}"
> > --
> > 2.13.0
> >
> > --
> > You received this message because you are subscribed to the Googl= e
> > 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/7c03d914f33ef0563cb7af2951f56e8cd5fd20= bc.1501760818.git.
> > henning.schild%40siemens.com. For more options, visi= t
> > https://groups.g= oogle.com/d/optout.
>
>
> This patch doesn't really do the things mentioned in commit messag= e,
> because you change the variables, for example: do_unpack[dirs] =3D
> "${WORKDIR}", so it's not only about moving, but also so= me reworking
> which is unclear for me.
>
> I've partially apply it (only fetch) to asmirnov/next


--001a113cf0e44170c905563a9e7f--