public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Alexander Smirnov <asmirnov@ilbers.de>
To: Christopher Larson <kergoth@gmail.com>, isar-users@googlegroups.com
Subject: Re: [PATCH] dpkg.bbclass: add lockfile for do_build
Date: Thu, 11 Jan 2018 13:31:45 +0300	[thread overview]
Message-ID: <c1c381a0-943f-bb12-8fad-45a96c99fb5a@ilbers.de> (raw)
In-Reply-To: <20180110160409.18273-1-kergoth@gmail.com>

Hello Christopher,

thank you for this catch!

On 01/10/2018 07:04 PM, Christopher Larson wrote:
> All recipes using this class will run build.sh in the same chroot, and
> build.sh runs apt-get to install deps, so the build can fail due to dpkg
> being unable to acquire its lock. Add a bitbake lockfile to ensure that
> only one do_build task for recipes inheriting this class runs at a time.
> 

Serialization of do_build tasks leads to whole Isar serialization, what 
is significant issue if you have lots of packages to build. So I think 
the "build" and "deps installation" should be split in separate tasks 
and only the second one should be protected by locks.

Alex

> Signed-off-by: Christopher Larson <kergoth@gmail.com>
> ---
>   meta/classes/dpkg.bbclass | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> index c10f5ba..3966a71 100644
> --- a/meta/classes/dpkg.bbclass
> +++ b/meta/classes/dpkg.bbclass
> @@ -7,3 +7,4 @@ inherit dpkg-base
>   dpkg_runbuild() {
>       sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR}
>   }
> +do_build[lockfiles] += "${TMPDIR}/dpkg.lock"
>

  reply	other threads:[~2018-01-11 10:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10 16:04 Christopher Larson
2018-01-11 10:31 ` Alexander Smirnov [this message]
2018-01-11 12:14   ` Henning Schild
2018-01-11 15:20     ` Christopher Larson
2018-01-11 17:20       ` Henning Schild

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=c1c381a0-943f-bb12-8fad-45a96c99fb5a@ilbers.de \
    --to=asmirnov@ilbers.de \
    --cc=isar-users@googlegroups.com \
    --cc=kergoth@gmail.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