From: Henning Schild <henning.schild@siemens.com>
To: Alexander Smirnov <asmirnov@ilbers.de>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH 2/2] class/dpkg: Unify workplace for packages
Date: Fri, 8 Sep 2017 13:29:00 +0200 [thread overview]
Message-ID: <20170908132900.1d5a2b95@md1em3qc> (raw)
In-Reply-To: <20170908094834.26496-3-asmirnov@ilbers.de>
Am Fri, 8 Sep 2017 12:48:34 +0300
schrieb Alexander Smirnov <asmirnov@ilbers.de>:
> Get rid of splitting package's data between WORKDIR and BUILDCHROOT.
> Now everything is stored into WORKDIR, and BUILDCHROOT is used for
> compilation only.
>
> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
> ---
> meta/classes/dpkg.bbclass | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> index 360a95c..f1a29aa 100644
> --- a/meta/classes/dpkg.bbclass
> +++ b/meta/classes/dpkg.bbclass
> @@ -3,12 +3,11 @@
>
> # Add dependency from buildchroot creation
> DEPENDS += "buildchroot"
> -do_unpack[deptask] = "do_build"
> +do_build[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}"
>
> @@ -27,9 +26,8 @@ python do_fetch() {
>
> addtask fetch before do_unpack
>
> -do_unpack[dirs] = "${BUILDROOT}"
> +do_unpack[dirs] = "${WORKDIR}"
> do_unpack[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
> -S ?= "${BUILDROOT}"
>
> # Unpack package and put it into working directory in buildchroot
> python do_unpack() {
> @@ -37,7 +35,7 @@ python do_unpack() {
> if len(src_uri) == 0:
> return
>
> - rootdir = d.getVar('BUILDROOT', True)
> + rootdir = d.getVar('WORKDIR', True)
>
> try:
> fetcher = bb.fetch2.Fetch(src_uri, d)
> @@ -48,17 +46,22 @@ python do_unpack() {
>
> addtask unpack after do_fetch before do_build
>
> +BUILDROOT = "${BUILDCHROOT_DIR}/${PP}"
> do_build[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
>
> # Build package from sources using build script
> do_build() {
> + mkdir -p ${BUILDROOT}
> + sudo mount --bind ${WORKDIR} ${BUILDROOT}
> sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR}
> + sudo umount ${BUILDROOT}
> + rm -rf ${BUILDROOT}
> }
Sweet, that seems to be going into the right direction. We do not
unpack to BUILDROOT anymore but rather make sure what is unpacked to
WORKDIR becomes visible in BUILDROOT for the build. Seems like what i
suggested in one of my last mails.
I think that would finally allow to move fetch and unpack out of dpkg.
Henning
> # Install package to dedicated deploy directory
> do_install() {
> - install -m 644 ${BUILDROOT}/*.deb ${DEPLOY_DIR_DEB}/
> + install -m 644 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
> }
>
> addtask install after do_build
next prev parent reply other threads:[~2017-09-08 11:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-08 9:48 [PATCH 0/2] Unify work space " Alexander Smirnov
2017-09-08 9:48 ` [PATCH 1/2] isar: Change build folders tree Alexander Smirnov
2017-09-08 11:47 ` Henning Schild
2017-09-08 12:36 ` Alexander Smirnov
2017-09-08 12:59 ` Henning Schild
2017-09-08 13:07 ` Henning Schild
2017-09-08 13:20 ` Alexander Smirnov
2017-09-08 13:36 ` Henning Schild
2017-09-09 9:39 ` Claudius Heine
2017-09-11 7:28 ` Alexander Smirnov
2017-09-11 8:27 ` Claudius Heine
2017-09-11 8:41 ` Alexander Smirnov
2017-09-08 9:48 ` [PATCH 2/2] class/dpkg: Unify workplace for packages Alexander Smirnov
2017-09-08 11:29 ` Henning Schild [this message]
2017-09-08 10:01 ` [PATCH 0/2] Unify work space " Alexander Smirnov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170908132900.1d5a2b95@md1em3qc \
--to=henning.schild@siemens.com \
--cc=asmirnov@ilbers.de \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox