public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Alexander Smirnov <asmirnov@ilbers.de>,
	isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH v3 5/9] Move buildchroot mounts into dpkg-base class
Date: Wed, 14 Feb 2018 10:16:31 +0100	[thread overview]
Message-ID: <6ca7a9c3-935f-038e-3860-27147bc03406@siemens.com> (raw)
In-Reply-To: <cbc97f38-99cd-b729-1093-209a2e184917@ilbers.de>

On 2018-02-14 10:09, Alexander Smirnov wrote:
> On 02/14/2018 11:52 AM, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> This avoids the unfortunate setup_mounts task which is either not
>> executed on rebuilds or causes excessive package rebuilds. We just need
>> ensure prior to switching into the buildchroot that all mount points are
>> populated. The mounts may race with parallel build, so lock-protect the
>> check if they are needed and their execution.
>>
>> Note that the more beautiful syntax using ( flock -n 9; ... ) 9>lockfile
>> as described in the flock man page does not work in bitbake shell
>> functions.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>
>> Changes in v3:
>>   - use flock instead of unreliable check pattern
>>
>>   meta/classes/dpkg-base.bbclass                   | 11 ++++++++-
>>   meta/recipes-devtools/buildchroot/buildchroot.bb | 30
>> +++---------------------
>>   2 files changed, 13 insertions(+), 28 deletions(-)
>>
>> diff --git a/meta/classes/dpkg-base.bbclass
>> b/meta/classes/dpkg-base.bbclass
>> index a45fbce..895ff26 100644
>> --- a/meta/classes/dpkg-base.bbclass
>> +++ b/meta/classes/dpkg-base.bbclass
>> @@ -2,7 +2,7 @@
>>   # Copyright (C) 2017 Siemens AG
>>     # Add dependency from buildchroot creation
>> -do_build[depends] = "buildchroot:do_setup_mounts"
>> +do_build[depends] = "buildchroot:do_build"
>>     # Add dependency between Isar recipes
>>   DEPENDS ?= ""
>> @@ -20,11 +20,20 @@ dpkg_runbuild() {
>>       die "This should never be called, overwrite it in your derived
>> class"
>>   }
>>   +MOUNT_LOCKFILE = "${TMPDIR}/buildchroot-mount.lock"
> 
> With this name lockfile will be shared for all multiconfigs. I realize
> that it's small, but unnecessary serialization of parallel parts.
> 
> Would it be ok?
> 
> MOUNT_LOCKFILE =
> "${TMPDIR}/buildchroot-mount-${DISTRO}-${DISTRO_ARCH}.lock"
> 
> or
> 
> MOUNT_LOCKFILE =
> "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot/mount.lock"
> 
> or
> 
> MOUNT_LOCKFILE = "${BUILDCHROOT_DIR}/mount.lock"
> 

Yes, good point! Feel free to pick what ever is preferred when merging,
unless there is a reason I need to resend the whole thing anyway.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

  reply	other threads:[~2018-02-14  9:16 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13 20:05 [PATCH v2 0/9] Add support for automatic partial rebuilds on recipe changes Jan Kiszka
2018-02-13 20:05 ` [PATCH v2 1/9] dpkg-raw: Install hooks automatically Jan Kiszka
2018-02-13 20:05 ` [PATCH v2 2/9] Fix indention of base_do_build Jan Kiszka
2018-02-13 20:05 ` [PATCH v2 3/9] Add clean and cleanall tasks Jan Kiszka
2018-02-14 15:14   ` [PATCH v3 " Jan Kiszka
2018-02-13 20:05 ` [PATCH v2 4/9] Enable recipe caching Jan Kiszka
2018-02-13 20:05 ` [PATCH v2 5/9] Move buildchroot mounts into dpkg-base class Jan Kiszka
2018-02-13 20:17   ` Alexander Smirnov
2018-02-13 20:47     ` Jan Kiszka
2018-02-14  5:54       ` Alexander Smirnov
2018-02-14  8:37         ` Jan Kiszka
2018-02-14  8:52   ` [PATCH v3 " Jan Kiszka
2018-02-14  9:09     ` Alexander Smirnov
2018-02-14  9:16       ` Jan Kiszka [this message]
2018-02-13 20:05 ` [PATCH v2 6/9] Enable proper rebuilds on dependency changes Jan Kiszka
2018-02-13 20:05 ` [PATCH v2 7/9] dpkg-raw: Clean DEBIAN dir prior to filling it Jan Kiszka
2018-02-15  9:14   ` Claudius Heine
2018-02-15  9:18     ` Jan Kiszka
2018-02-15 10:26       ` Claudius Heine
2018-02-15 10:30         ` Alexander Smirnov
2018-02-15 10:53           ` [PATCH] dpkg-raw: Fix creation of DEBIAN folder Jan Kiszka
2018-02-15 15:39             ` Alexander Smirnov
2018-02-26 11:39             ` Andreas Reichel
2018-02-26 12:03               ` Jan Kiszka
2018-02-26 12:27               ` Andreas Reichel
2018-02-15 12:20           ` [PATCH v2 7/9] dpkg-raw: Clean DEBIAN dir prior to filling it Claudius Heine
2018-02-13 20:05 ` [PATCH v2 8/9] isar-image-base: Clean rootfs folder prior to building Jan Kiszka
2018-02-13 20:05 ` [PATCH v2 9/9] buildchroot: Clean up rootfs prior to populating it Jan Kiszka
2018-02-14 17:43   ` Alexander Smirnov
2018-02-14 17:48     ` Jan Kiszka
2018-02-14 11:33 ` [PATCH v2 0/9] Add support for automatic partial rebuilds on recipe changes Alexander Smirnov
2018-02-14 12:41   ` Jan Kiszka
2018-02-14 12:57     ` Alexander Smirnov
2018-02-14 13:10       ` Jan Kiszka
2018-02-14 13:29         ` Jan Kiszka
2018-02-14 13:38           ` Jan Kiszka
2018-02-14 13:49             ` Jan Kiszka
2018-02-14 14:06               ` Alexander Smirnov
2018-02-14 14:03             ` Alexander Smirnov
2018-02-14 14:10               ` Jan Kiszka
2018-02-14 17:51 ` Alexander Smirnov
2018-02-14 17:54   ` Jan Kiszka
2018-02-14 17:57     ` Alexander Smirnov
2018-02-14 18:02       ` Jan Kiszka
2018-02-14 18:34         ` 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=6ca7a9c3-935f-038e-3860-27147bc03406@siemens.com \
    --to=jan.kiszka@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