From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6449247988281769984 X-Received: by 10.223.143.3 with SMTP id p3mr364149wrb.10.1502193594483; Tue, 08 Aug 2017 04:59:54 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.31.199 with SMTP id f190ls1799973wmf.25.canary-gmail; Tue, 08 Aug 2017 04:59:53 -0700 (PDT) X-Received: by 10.28.214.84 with SMTP id n81mr569417wmg.29.1502193593879; Tue, 08 Aug 2017 04:59:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502193593; cv=none; d=google.com; s=arc-20160816; b=dB+e0u35qjLRP9IsFqwbfAP2v6aiHnvSc4Uq+0A18B4FILtHqHV34qrB8w8vqka8Vy MZYVO5Zy8OpeC5dhwMSKMk6uht28izF+k7n5PAc6zWIIeo/zC76Zh5lAogph/kTh04sG m1NIt/hu6l24rZcEILnr7c5xWtd9pIPOH8KJWoEfSxrkv9/lGfv7tlHbvKi+gN/iypOd QRt+dsm2CA2ou5xZHVbav2LyjAuYvC8FttBQxEfzoc986t8Q44zBYkFS/YzYSdvjOvob 13pOPJd7plUXY6+fijQESYAf0zFVcKF0BUxQb2FlNPCdmxpJTY2ZvzHUBqoVnctxhFLC dz6A== 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=TPJS5wwgJo2X4b5BnwaH49y2sGyLeK1LsrpwcdaCm3M=; b=UIPBeg0ylDyMJKNr9/wXpoZv8gtgAMP+vMXPU2/w99hz4qUgvHyNfkhBF7eBTRy02n yDUeSeLYJcZr3DaDqYX1iYyma1CYofgbFXXVfDCwDQFc3vb9TtB2gasJ/8ln1i5NbTrG uCXDe7tXnzXAx9IIvqVqvwcowmyUaGmHiRr/LzQ+krYv9autGhYshGyQhSRjqqaarGdZ A4JKHvrWGJgoa+CTABkle38xCWaLqcImEEScS/LmiSiYP5aKI91KAhTJkImzvxIq1jDy leK3nABlHrLjSTTaJKSn3FIC9z9p+Ep8PlyWJgpQJe8cf5hzSAphNyy0cRVoFHKBsRnf JzTw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.2 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 thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id h133si3167240wmg.2.2017.08.08.04.59.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Aug 2017 04:59:53 -0700 (PDT) Received-SPF: neutral (google.com: 192.35.17.2 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.35.17.2 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 thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id v78BxrsK014826 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 8 Aug 2017 13:59:53 +0200 Received: from md1em3qc ([139.25.68.40]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id v78Bxr8v023787; Tue, 8 Aug 2017 13:59:53 +0200 Date: Tue, 8 Aug 2017 14:01:50 +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: <20170808140150.17be7599@md1em3qc> In-Reply-To: References: <7c03d914f33ef0563cb7af2951f56e8cd5fd20bc.1501760818.git.henning.schild@siemens.com> <20170808100025.02645738@md1em3qc> 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: cG3ujYhpee+/ Am Tue, 8 Aug 2017 12:30:46 +0300 schrieb Alexander Smirnov : > 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. 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 > > > >