public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Alexander Smirnov <asmirnov@ilbers.de>
To: Jan Kiszka <jan.kiszka@siemens.com>,
	isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH] linux-custom: Add lock to dependency installation
Date: Mon, 5 Mar 2018 10:16:17 +0300	[thread overview]
Message-ID: <4e09e77e-07b7-c48a-894d-1c8f156c23f6@ilbers.de> (raw)
In-Reply-To: <561e3ebb-f877-596c-fde6-0f3bba770958@siemens.com>



On 02/23/2018 12:25 AM, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> The build script of linux-custom requires the same lock protection as
> build.sh of the dpkg builder class. Otherwise, we see the infamous build
> failures again due to contention on the dpkg database lock.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>   meta/recipes-kernel/linux/files/build-kernel.sh | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh b/meta/recipes-kernel/linux/files/build-kernel.sh
> index 94897ec..42c8ff6 100644
> --- a/meta/recipes-kernel/linux/files/build-kernel.sh
> +++ b/meta/recipes-kernel/linux/files/build-kernel.sh
> @@ -13,8 +13,10 @@ REPACK_DIR="$1/../repack"
>   REPACK_LINUX_IMAGE_DIR="${REPACK_DIR}/linux-image"
>   REPACK_LINUX_HEADERS_DIR="${REPACK_DIR}/linux-headers"
>   
> -apt-get install -y -o Debug::pkgProblemResolver=yes --no-install-recommends \
> -	${KBUILD_DEPENDS}
> +# Lock-protected because apt and dpkg do not wait in case of contention
> +flock /dpkg.lock \
> +    apt-get install -y -o Debug::pkgProblemResolver=yes \
> +        --no-install-recommends ${KBUILD_DEPENDS}

The same stuff as in "meta/recipes-devtools/buildchroot/files/build.sh", 
but different style. Can we keep things similar as much as possible?

Why not

(
    ...
) 42>/dpkg.lock

?

Alex

  parent reply	other threads:[~2018-03-05  7:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 21:25 Jan Kiszka
2018-03-04 19:50 ` Jan Kiszka
2018-03-05  7:16 ` Alexander Smirnov [this message]
2018-03-05  7:20   ` Jan Kiszka
2018-03-05  9:58 ` 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=4e09e77e-07b7-c48a-894d-1c8f156c23f6@ilbers.de \
    --to=asmirnov@ilbers.de \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.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