From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6449247988281769984 X-Received: by 10.28.63.199 with SMTP id m190mr486788wma.0.1502179110262; Tue, 08 Aug 2017 00:58:30 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.25.56.79 with SMTP id d15ls220665lfj.51.gmail; Tue, 08 Aug 2017 00:58:29 -0700 (PDT) X-Received: by 10.46.83.65 with SMTP id t1mr391350ljd.44.1502179109565; Tue, 08 Aug 2017 00:58:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502179109; cv=none; d=google.com; s=arc-20160816; b=FUfigtgqlv29IHBmB3DfDVuO+NQGdLkSR2UjFWarIM/3VcdholiDcmclyveK47Ynes 8Pmhew/+6WST1QN7OD/fdegOopY3+5X1yn8pJ+VxkU+Lu+5BwLhEgEZqY0vnge8KaOB8 IWrurwcMRNsHNEZUIszLx6wVCWUSEydMmfK3PLyPZOGTdXZ0BdiNmiyV24UOIcWvgpQ7 SmgO9JFi50VJomirJHj5TANtJdt4uiojC+gai1Xdg9Gyj9lnt10gpRSGzYXArL1LvTy0 3lI4f2plKqdW7C4aMSC8dsMNUWd5jGhdjEMuLV0yJgXc2xdxjmcmCVnhFt7IXGkiEYbb 6T5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=lbPPXli7sJtEiiKGLULgwWO9hn175csm3tSR5KPdNn4=; b=Bs0JKOl/IXOqJLRI/5+/DA9jblZz81aHAkra1yoyO9o1Bm29donhgU7mlvHnlbw1d7 jQmZeA8MFGzlSDYIvNSdyZJiGe1uetm83YebhJhSFEw7ruBOr7tPmCWkHzK4CVZbzcXw g0FWkTU1KfqpUrGauZ/zDRbqeIxC+HRT/wzAQkkubLh5vbk080+cLwpJH0Fl5ZmC06m6 7XH7ff5Fx+EssXmwpRHKgywUcirPOC93iUkuv2TvDN8GeJZbi3nPyRY8O5gP++WayCvZ KftuIeolASCDpnesAmF4TzXmuaDEZe38Q/athezHisnWFILptwIgVAi+sbP2cAv3dxDo 2z+Q== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.14 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id r143si279825wme.3.2017.08.08.00.58.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Aug 2017 00:58:29 -0700 (PDT) Received-SPF: neutral (google.com: 192.35.17.14 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.35.17.14 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) smtp.mailfrom=henning.schild@siemens.com Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id v787wSPf022353 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 8 Aug 2017 09:58:28 +0200 Received: from md1em3qc ([139.25.68.40]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id v787wSH7025611; Tue, 8 Aug 2017 09:58:28 +0200 Date: Tue, 8 Aug 2017 10:00:25 +0200 From: Henning Schild To: Alexander Smirnov Cc: Subject: Re: [PATCH 0-10 of 16 v2 6/8] classes: move fetch and unpack into isar-base Message-ID: <20170808100025.02645738@md1em3qc> In-Reply-To: References: <7c03d914f33ef0563cb7af2951f56e8cd5fd20bc.1501760818.git.henning.schild@siemens.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: ZUJCKjUinjyG 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. Henning > > 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