From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6449247988281769984 X-Received: by 10.46.22.23 with SMTP id w23mr2713946ljd.21.1501673304426; Wed, 02 Aug 2017 04:28:24 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.145.1 with SMTP id t1ls704371wmd.2.canary-gmail; Wed, 02 Aug 2017 04:28:23 -0700 (PDT) X-Received: by 10.28.191.3 with SMTP id p3mr298738wmf.16.1501673303368; Wed, 02 Aug 2017 04:28:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501673303; cv=none; d=google.com; s=arc-20160816; b=LyXuQJEBKrbKF9WV+J0zvsVcHLwtO++8uHZZH/cweHPY8S5EtRRS8KhlQTRMco1tWO vVJtOYNaescTeYxIAYMh3XWFjI3fJOjT2ukbw9Mz6h2QXzfIvsp3Gk0xs4k5GtFSue90 SjEs9xNpZgvpcOZd+YOMWFo6yYzYedWQdB2a3pFy9AvOkNuAZlvWUTDHn44rBa9oc+Qx 0dBpUoQC16BtgFKJygtF8GTOeY5SyTWhLaC4h3B6o52i03Ln2x7at+DWJdPHBWPpgH/I jbaa+vQYOrfH6u3DCXC85NWpWFYRSO4pk1ygj4TI1IVwGi3g3Pt3K7i6PJMMymH8RsHy N6Bw== 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=k5xZQmbr8xeYMPMiHuFirtKjF3fYZTbpi+Pw3pdxkzI=; b=BMEceiCNHsEUyf9dN1pDLPnuOs3HCg3C9oosQKSSjLkYpackNHoHApFowDYdhOduel orZ7Qsm4jCrDxJ+qXaGxMXCJAaPpap2GojQR+MTCeOZwgJ0Nr5f8Lz28PlFFjc77H770 H8iTpAGS0bsKLRRYwFg3mNon/ZaxeBkElxXzEOG8VyFzltkDZuzRc6HSCRwR9eR4W2RN PzDkrgVdqHlUJXkRoBBkIY/xWU9nVP0vnYD8NwUGLRy2O2QHQsnV3UmpcgVrGTSES57y t8iymhTTYYAr5c/nY1JUMRjvgb5yfeEsPHRiVOmjvg4CR2hfOlD2WIwpi4GcxMDHcxd+ ye9w== 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 132si899141wmn.6.2017.08.02.04.28.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Aug 2017 04:28:23 -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 mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id v72BSDvb011496 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 Aug 2017 13:28:13 +0200 Received: from md1em3qc ([139.25.68.40]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id v72BSDoP030078; Wed, 2 Aug 2017 13:28:13 +0200 Date: Wed, 2 Aug 2017 13:30:07 +0200 From: Henning Schild To: Alexander Smirnov Cc: Subject: Re: [PATCH 07/16] classes: use WORKDIR and get rid of BUILDROOT Message-ID: <20170802133007.5d6d7b52@md1em3qc> In-Reply-To: References: <048e88d5072fc038c8bd6207334e9967d5a29e0c.1501582237.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: ceNL79UiKwgV Am Wed, 2 Aug 2017 12:24:29 +0300 schrieb Alexander Smirnov : > 2017-08-01 13:17 GMT+03:00 Henning Schild > : > > > Signed-off-by: Henning Schild > > --- > > meta/classes/dpkg.bbclass | 15 ++++++--------- > > 1 file changed, 6 insertions(+), 9 deletions(-) > > > > diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass > > index 3d7aafb..1d0132b 100644 > > --- a/meta/classes/dpkg.bbclass > > +++ b/meta/classes/dpkg.bbclass > > @@ -10,9 +10,7 @@ do_unpack[deptask] = "do_build" > > # Each package should have its own unique build folder, so use > > # recipe name as identifier > > PP = "/home/builder/${PN}" > > -BUILDROOT = "${BUILDCHROOT_DIR}/${PP}" > > - > > -do_fetch[dirs] = "${DL_DIR}" > > +WORKDIR = "${BUILDCHROOT_DIR}/${PP}" > > > > WORKDIR is no the only folder to fetch sources to. This folder > represents workspace for all operation with folder, for example > $WORKDIR/temp contails log files. > > Initially Isar designed to follow OE/Yocto style where it's possible. > Traditionally tmp/work folder contains all the packages workspaces > with: build atifacts, patches, bitbake logs etc... So in general it > looks like (roughly speaking): > > tmp/work/toolchain/package/* > > This conception ideally works with cross-compilation, when you can > compile packages out of the rootfs tree. Isar implements native > compilation, so we can't build package within current workspace. So > the decision was to keep workspace as it is but relocate build folder > to buildchroot. The main benefit of this approach, that there is a > single package workspace for bitbake metadata, while there may be > many buildchroots (different Debian distros and > machines/architectures). > > In my opinion this change is another step away from OE/Yocto style. > > @Henning: could you please describe the motivation of this change? I did not understand all that of Isar when i applied that change. The motivation was to use well-known names instead of inventing new ones. I will drop that patch from the q. Henning > @All: any opinions are highly appreciated. > > > > > > # Fetch package from the source link > > python do_fetch() { > > @@ -28,10 +26,10 @@ python do_fetch() { > > } > > > > addtask fetch before do_build > > +do_fetch[dirs] = "${DL_DIR}" > > > > -do_unpack[dirs] = "${BUILDROOT}" > > do_unpack[stamp-extra-info] = "${DISTRO}" > > -S ?= "${BUILDROOT}" > > +S ?= "${WORKDIR}" > > > > S folder is used for unpacking sources. WORKDIR - is whole package > workspace. S should not equal to WORKDIR, otherwise this will lead to > mess between package sources and bitbake metadata. For example Also > artifacts from FILESDIR are usually installed to the root of WORKDIR. > > > > > > > # Unpack package and put it into working directory in buildchroot > > python do_unpack() { > > @@ -39,16 +37,15 @@ python do_unpack() { > > if len(src_uri) == 0: > > return > > > > - rootdir = d.getVar('BUILDROOT', True) > > - > > try: > > fetcher = bb.fetch2.Fetch(src_uri, d) > > - fetcher.unpack(rootdir) > > + 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_build[stamp-extra-info] = "${DISTRO}" > > > > @@ -62,7 +59,7 @@ do_install[stamp-extra-info] = "${MACHINE}" > > # Install package to dedicated deploy directory > > do_install() { > > install -d ${DEPLOY_DIR_DEB} > > - install -m 755 ${BUILDROOT}/*.deb ${DEPLOY_DIR_DEB}/ > > + install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/ > > } > > > > addtask do_install after do_build > > -- > > 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/048e88d5072fc038c8bd6207334e9967d5a29e0c.1501582237.git. > > henning.schild%40siemens.com. For more options, visit > > https://groups.google.com/d/optout.