From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6449247988281769984 X-Received: by 10.223.128.204 with SMTP id 70mr150258wrl.20.1501759353979; Thu, 03 Aug 2017 04:22:33 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.9.210 with SMTP id 201ls94861ljj.46.gmail; Thu, 03 Aug 2017 04:22:33 -0700 (PDT) X-Received: by 10.46.25.82 with SMTP id p79mr208597lje.5.1501759353539; Thu, 03 Aug 2017 04:22:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501759353; cv=none; d=google.com; s=arc-20160816; b=eJ7RhS1q1SV7Fg4DWf2DmnAQKk72BUSjt0LTdSwK/eLv1xPaDFJhaR+JXNPPXgiii/ ITFoSZK5hCDM65e+WRn8ahspkenRMCS2Tm/tWQEOO5GAdCy1J+23WN7ZyYQ7QygdY42P p72VfNE2u4bOko3f9n6q7wd8uuYb2i6y1t4/25thC2PjNnaich3NpzMsUgwzEZYycXly 07/yFGtJLjiKfOiwUemWnd0dxPv2kVLrlFXoWx68jgg0+OvhSFhfdfKp90N5Mgl5+M+s dhJxKlIgtkpQrdDgCMdD8W6J/CeuPhU2QDe7+rVEhy+OtsPP7yRhX2tP3+DdInlmnciJ gsBA== 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=rQUodkDFtRo0jh3J5AEMfr5iRJYVuNNExICnpaKGNI4=; b=aOwNEGpdJsB4xI6tNadyEHlLDo4V4pnU+ZQcjAqllX6CkwjFVr1bt/mVoiorSkKvIm lffX7Z/FEqd9wAB+NXr6jakyuyq5e5+VPCEZYYl+r+ETBL/rNEM8Rb+5I2DdrpgiLgl+ xwmb2VS6ohzshjkr1fZ2a52MbxanCOw6hPKbdIUoUZVU9xeOcRyAQmNIVtHR21cMiM5G h/XbiK4oGY6h2NhHCGo2YgQVF0UNeMTa4RKVAdVMzkkbly9lkTvYPmJllLUwduhsUq9G 3kPfzdXLdH0mx6+7BAZLo2vYvpgGl/QI5K2aXoTNs/YNmqkMSkihHbnZa/wu0rIV+ejH jgsw== 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 m6si727017wmh.7.2017.08.03.04.22.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Aug 2017 04:22:33 -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 v73BMWUL004219 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 3 Aug 2017 13:22:32 +0200 Received: from md1em3qc ([139.25.68.40]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id v73BMWBv031388; Thu, 3 Aug 2017 13:22:32 +0200 Date: Thu, 3 Aug 2017 13:24:27 +0200 From: Henning Schild To: Alexander Smirnov Cc: Subject: Re: [PATCH 07/16] classes: use WORKDIR and get rid of BUILDROOT Message-ID: <20170803132427.220286b1@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: NPLEd1OQ5W2q 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}" > > Initially i wanted to drop that patch from the q because i did not really understand all of your points. But now i think i can not drop it and we need to clarify. The next version i send will contain a workaround where the unpacker will unpack to BUILDROOT, so we can progress with merging the patches while we still talk concepts. First off the motivation behind the change: The fetcher and unpacker are required for all sorts of classes, my queue introduces fetch/unpack in the new dpkg-bin package and Claudius is already using the fetcher in other classes to solve different issues. Each basic image and package class should provide fetch/unpack, not just dpkg. > 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. The files are fetched to DL_DIR just like before. > 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/* Yes bitbake.conf says WORKDIR = "${TMPDIR}/work/${PF}" PF = "${PN}-${PV}-${PR}" Looks like toolchain is missing in the default WORKDIR > 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). I guess i understand now. In that case i would suggest to have MY_WORKDIR = WORKDIR/ARCH/DISTRO/... and keep the multiple versions still under the original WORKDIR. Because as the name suggests, that is where work should be done. > In my opinion this change is another step away from OE/Yocto style. I do not know OE too much but it is supposed to be a clone of gentoo. And in gentoo you do all your work in WORKDIR and do not break out. Henning > @Henning: could you please describe the motivation of this change? > @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.