From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6449247988281769984 X-Received: by 10.99.120.2 with SMTP id t2mr1068841pgc.30.1502134856154; Mon, 07 Aug 2017 12:40:56 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.36.172.109 with SMTP id m45ls2413405iti.11.canary-gmail; Mon, 07 Aug 2017 12:40:55 -0700 (PDT) X-Received: by 10.176.20.178 with SMTP id d47mr687191uae.9.1502134855908; Mon, 07 Aug 2017 12:40:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502134855; cv=none; d=google.com; s=arc-20160816; b=jxpdIkac57peRrCVLsVtYb75Op5oBl9cKKDk8heNnV2uGBAr7phgEFiF7p9ANcCIO0 /CRZQw6cvRr96Slz7chYLNk65/9mD1m1F+th4PZWCkwcZovDHOPeojIOhTu4yvj0trlh JFM2OB39/jxEtdYKwksgR94dMBDIqS7tNJf4Ad44w+fZXmxuONnwPyLVT6AuoO1i59EQ IPfCA//1bIVKPGLrwJX2Rk3qQilydYJGNjHYetmneazxEb7UnfxfEri3W/q+vUwgNgaI q1KsbEMz2S6WkrsJre9P1mgr9PHRK58u3jAPfCeeALCahTxxETpE08r7/HfIwdevnnLE M8HQ== 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=yy5VzNO6EEH7/2rWN44wf6Zg9/x6VLcpGACTBWqmYbw=; b=b4E0l7gZ6dklw9CU5WCiGpmup32wciYjbkbTmEzII4q2P5lh4dtBs+IU6+cI3n+Wm5 s7kIBZEGx6CJhmfVc+a9inMxa9xPLsP7pTCbgfsUQ7nWwkTb/H4LLvAuUBrvERyD3qVy jn3GltuEo4r4PXriYW974cUAaI3v2ennXBmpT1J7299kvuDeuLkOnIlCkX+dd7dqZiqN J+ROnML9ljXaj88xxpbPNUaN/1dmD71oUUcgwA76X0V4krh9SlaSiwp7ohifDJcMa3UU +SCRnFvWD8QhQcrhR50+W5JgN/sZYp4ata1xpMXxldudnerGas7dxZn8zZBz7GM/MY8G UKIw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.b=oeNhVnoE; spf=pass (google.com: domain of alex.bluesman.smirnov@gmail.com designates 2607:f8b0:400d:c0d::234 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-x234.google.com (mail-qt0-x234.google.com. [2607:f8b0:400d:c0d::234]) by gmr-mx.google.com with ESMTPS id g6si252498ywf.15.2017.08.07.12.40.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Aug 2017 12:40:55 -0700 (PDT) Received-SPF: pass (google.com: domain of alex.bluesman.smirnov@gmail.com designates 2607:f8b0:400d:c0d::234 as permitted sender) client-ip=2607:f8b0:400d:c0d::234; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.b=oeNhVnoE; spf=pass (google.com: domain of alex.bluesman.smirnov@gmail.com designates 2607:f8b0:400d:c0d::234 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-x234.google.com with SMTP id p3so8660109qtg.2 for ; Mon, 07 Aug 2017 12:40:55 -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=yy5VzNO6EEH7/2rWN44wf6Zg9/x6VLcpGACTBWqmYbw=; b=oeNhVnoEXzuknw0fZ0I/7dK9A7rLa4mnqR9J0z9K9w8zfUutzdTP0aI54O+nqWZtEB RM/d1S+vRLO+nQlWLjkMb5zRV9G1x8f6V9lDDjP787dPpMax2t+d/j8U7ZhJDzzfM/b5 aN7AYUR1Um6Y5PA7SZX1u3OpIM2f+otEPcqtoztT9guvujIs7HabKST1cZrbrRwSwO0R vAoy4XfaT354YZ/SFWCEcBBUD8HbAoAuaUPyOVOjBRtrwh/bA6G1Aqn4BPUYC0dQVW3N x1nx66cwmSEY2zcbpmZ3CqIHDKGgZ3isPOA/0izdOelcWluzfTh8Vedgdn/RGUOIX2Lm yp5Q== 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=yy5VzNO6EEH7/2rWN44wf6Zg9/x6VLcpGACTBWqmYbw=; b=WO7axBDO4ditQ6VJ5/nR284gmEP7e2yJtBZPQNLPVksxpgl8O6AclJjqWt2RUeZSvg aRJ2b77396TjjCHspHscdJ37KUpP2Y+3bU2ePHzsaJGNVDN9Gn0y8ccZuyuVyYO/0l49 CKqZ1BvZzx5ZNqQ7CLRmsESm5vrkbeYf0r/1xKaXc7oVXCiEC671hcOkFHiKLq5FOtaS 2B7cPVjlVcxvrr2v2eps1wAMX2utT0Tg1djCaQgJB4BzPQQudt+TRn5GHUq/gK+cgwD4 +znh1xIutg3LIfBnUamKmRqsS8Iq8Nqwzynnqai7Oj2/nXDYEGFVC094/q2SaWarg7uZ 07wQ== X-Gm-Message-State: AHYfb5j7CRSoQIVefHuDtmypq0pPBv3L6AKTXRBxqFmAaeQ2UQx5FrAw L29H7LhzIhUC0ULFDMYdC2LuuIQtDg== X-Received: by 10.237.37.140 with SMTP id x12mr2306845qtc.133.1502134855692; Mon, 07 Aug 2017 12:40:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.148.188 with HTTP; Mon, 7 Aug 2017 12:40:55 -0700 (PDT) In-Reply-To: <7c03d914f33ef0563cb7af2951f56e8cd5fd20bc.1501760818.git.henning.schild@siemens.com> References: <7c03d914f33ef0563cb7af2951f56e8cd5fd20bc.1501760818.git.henning.schild@siemens.com> From: Alexander Smirnov Date: Mon, 7 Aug 2017 22:40:55 +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="001a114211e27a765e05562f06dc" X-TUID: PgZ98lZH5okS --001a114211e27a765e05562f06dc Content-Type: text/plain; charset="UTF-8" 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}" > > 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 --001a114211e27a765e05562f06dc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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>
---
=C2=A0meta/classes/dpkg.bbclass=C2=A0 =C2=A0 =C2=A0 | 38 ++----------------= --------------------
=C2=A0meta/classes/isar-base.bbclass | 33 +++++++++++++++++++++++++++++++++
=C2=A02 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] =3D "do_build"
=C2=A0# recipe name as identifier
=C2=A0PP =3D "/home/builder/${PN}"
=C2=A0BUILDROOT =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 "&quo= t;).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=A0S ?=3D "${BUILDROOT}"

-# Unpack package and put it into working directory in buildchroot
-python do_unpack() {
-=C2=A0 =C2=A0 src_uri =3D (d.getVar('SRC_URI', True) or "&quo= t;).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}"

=C2=A0do_build[stamp-extra-info] =3D "${DISTRO}"

diff --git a/meta/classes/isar-base.bbclass b/meta/classes/isar-base.<= wbr>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=A0do_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 "&quo= t;).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 buildchroot
+python do_unpack() {
+=C2=A0 =C2=A0 src_uri =3D (d.getVar('SRC_URI', True) or "&quo= t;).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('WORKDIR'= , 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 Google Groups &= quot;isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-u= sers+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/7c03d914f33ef0563cb7af295= 1f56e8cd5fd20bc.1501760818.git.henning.schild%40siemens.com.<= br> For more options, visit https://groups.google.com/d/optout.

--001a114211e27a765e05562f06dc--