From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6449247988281769984 X-Received: by 10.25.29.147 with SMTP id d141mr2484083lfd.20.1501675429115; Wed, 02 Aug 2017 05:03:49 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.25.40.200 with SMTP id o191ls465082lfo.20.gmail; Wed, 02 Aug 2017 05:03:48 -0700 (PDT) X-Received: by 10.25.18.87 with SMTP id h84mr2303040lfi.40.1501675427771; Wed, 02 Aug 2017 05:03:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501675427; cv=none; d=google.com; s=arc-20160816; b=ixYUVudLAPCQpRtgQanOehCBosRhLXOIEktAKC152ArX/TCRiOHk47JCSRNpgFtmTs mYQQvbzaMO7386w4JIBK5ofsOZeGsuTqrYAw0ff9whknod84qFMDpWcgoOdpQX6GG1Ki HOOcW40YdEHE2FUWuyoAGeCW9k9fNqy+f9/33Q3xU5khoiH3Zrec/z2/bRfnOa0oCLG/ nF0S+S4Wla+cSSWVHt102a5zvjQ/cLbDWTBAAe6C68H3wr0wervi0h5hFhmwiSsPTQ0n rrMlQ/SiedOtcU75yM/5ENJtig9C4ufGgb/dg25N/4+xCJLEUPMV3JpJw+yUgpjMqab+ rBwA== 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=/japzQMt8jX0AdzTQ9kdcQVqgR0ahpF0oRr0AB9eR3Q=; b=vv0G6fGYsqPdMKLOiUVwx5/qu/yq1K892H7l7p3D8BJHbqng5KKeIy91zWAMP61jRO vyGygGUJD2sHB/rJwzrMj2k+UrnlCrHPsB0M6mOZXWlNH0N1v3TXRggPkpsKwrgFc7yU YaxcJyoBe0DSgRky4mKkYglxDGPDMp8FUO4D3TKWL8N85AVqce6CQ24WGe04vtAiqy8w UZNlRhLc45DldiwB1iQbX+RNCkLSqopPf+k0oO7EpDMazrKW97+57RjAzzhzgTEje2vc yfEnmdzy9W0HjyvsRE+UhmE5VZ3wyec40aN3oEniIC1VUBuebuGuSQ/XvrNfBcMnzfhj 7yFQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.28 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 goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id f3si1284359wme.4.2017.08.02.05.03.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Aug 2017 05:03:47 -0700 (PDT) Received-SPF: neutral (google.com: 192.35.17.28 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.35.17.28 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 goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id v72C3bXb030194 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 Aug 2017 14:03:37 +0200 Received: from md1em3qc ([139.25.68.40]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id v72C3bIO002820; Wed, 2 Aug 2017 14:03:37 +0200 Date: Wed, 2 Aug 2017 14:05:32 +0200 From: Henning Schild To: Alexander Smirnov Cc: Subject: Re: [PATCH 11/16] meta: classes: make do_build always the end of the task-chain Message-ID: <20170802140532.6e45c0ef@md1em3qc> In-Reply-To: References: <32e4ef6d06af30a76fdb645a4108f817301d3007.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: p358Wfw8xC1z Am Wed, 2 Aug 2017 12:54:46 +0300 schrieb Alexander Smirnov : > 2017-08-01 13:17 GMT+03:00 Henning Schild > : > > > build is bitbakes default target and queing tasks behind it is > > asking for trouble > > > > Could you please specify more details about this. If you run "bitbake " what actually happens is "bitbake -c build". So keeping all the tasks before a possibly empty do_build makes sure that manual invokations of bitbake always run all tasks. I am not sure whether [deptask] defaults to build as well. I would see it like the "all" target of a Makefile. But thinking about it the "cp *.dep ..." could be seen like "make install" and could be allowed to happen after the default task. It is a matter of taste i guess. How should we proceed? Put do_install_package after do_build or keep it in front? Henning > > > Introduce do_compile where we "build" the debian packages. > > > > Signed-off-by: Henning Schild > > --- > > meta/classes/dpkg.bbclass | 8 ++++---- > > meta/classes/image.bbclass | 2 +- > > 2 files changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass > > index 4228b0d..71c7122 100644 > > --- a/meta/classes/dpkg.bbclass > > +++ b/meta/classes/dpkg.bbclass > > @@ -13,19 +13,19 @@ PP = "/home/builder/${PN}" > > WORKDIR = "${BUILDCHROOT_DIR}/${PP}" > > S ?= "${WORKDIR}" > > > > -do_build[stamp-extra-info] = "${DISTRO}" > > - > > # Build package from sources using build script > > -do_build() { > > +do_compile() { > > sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR} > > } > > > > > Probably it makes sense to use more evident task name like > do_dpkg-buildpackage or short version - do_buildpackage. > 'dpkg-buildpackage' is exactly what is executed in this task, it's > not only about compiling. I wanted to choose names that can be reused in other contexts, classes later and stay close to gentoo/OE. But i do not care much about names and will apply your suggestion. Henning > > > +addtask compile after do_unpack before do_install > > +do_compile[stamp-extra-info] = "${DISTRO}" > > > > # Install package to dedicated deploy directory > > do_install() { > > install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/ > > } > > > > -addtask install after do_build > > +addtask install after do_compile before do_build > > do_install[dirs] = "${DEPLOY_DIR_DEB}" > > do_install[stamp-extra-info] = "${MACHINE}" > > diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass > > index 3e4877c..8db3352 100644 > > --- a/meta/classes/image.bbclass > > +++ b/meta/classes/image.bbclass > > @@ -27,4 +27,4 @@ do_populate() { > > } > > > > addtask populate before do_build > > -do_populate[deptask] = "do_install" > > +do_populate[deptask] = "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/32e4ef6d06af30a76fdb645a4108f817301d3007.1501582237.git. > > henning.schild%40siemens.com. For more options, visit > > https://groups.google.com/d/optout.