From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6509455202632859648 X-Received: by 10.80.134.135 with SMTP id r7mr3016539eda.1.1515672868001; Thu, 11 Jan 2018 04:14:28 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.80.145.246 with SMTP id h51ls4010583eda.8.gmail; Thu, 11 Jan 2018 04:14:27 -0800 (PST) X-Google-Smtp-Source: ACJfBovlDUoaSnoZHtPb+PrIdT1pi0EMCbRVxRg3fFnevqKO3Po8hLKc5akoljR1zdQP2UeLhbJt X-Received: by 10.80.177.165 with SMTP id m34mr7207773edd.5.1515672867556; Thu, 11 Jan 2018 04:14:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515672867; cv=none; d=google.com; s=arc-20160816; b=sGZYscl0Jr9J82M++FWCY34Au03UHlqzfH3Kj4cC+yuzv0Zl0i94jYNPHXDbcxqnWu P0q9ARlcyKplXrvz6tdUVXa7k2h1UL1PfZim6I6yvSofLSJuZVpDYc5f9ohRVsXzJ0e2 8YH9c6sh1kK7OvSxg5kZ8/ylZ7NSfmPZNa+2YXz64ffo694gwegA2bxawmb5QbAcQMu/ aat+zXaQpuEKSd1Yk+2OI8uZArsmywM93rsUWxw1CLOyEDI3vkLBp6CcaFS2Fcn1OGmO Pi4p6pAHS65SZh0g8avMG1sua6JVZCXdBKxGXdzX5wZ2uJti3YkLJ3i63np3qacj1dw7 y6Mg== 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=SDb+CpKUJN8a2ZA7qUnB3kSgkw8sDDE/aj1TsmUMfBg=; b=TqyBjMkQOtu1Xq8Ut4PynpuY0RqQDzY8nZKrbhDwVFov/W2WU3o5tALOKID1sgw2wl oqxcbGxsLKgtoGL8kReKF8KtM7zXtC245DvB6PcBekZ/Il/hOyy4sjXcutSmMX+DZixT fkq0VUGz4muFjBuUCttpZU+qx1rLbUjG5wC0Fj/kns4RmzU1izeDETHLsYWHcrCuiYeS o2Xoh4RIVV5lpeGjNLD8bXsKIGZ/D9Nga6rpYkYOu2ipWwnS40EWnLtm/FsvQ5EiEx2S H05YWfHLfK9bafLJLUwyWNjQwCcNofaDpwadLPdZI9F8ZOBCPjU8piW4XOmRrxXXszAL QIIg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) 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 d2si19440ede.4.2018.01.11.04.14.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jan 2018 04:14:27 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id w0BCEQ72013091 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 11 Jan 2018 13:14:26 +0100 Received: from mmd1pvb1c.ad001.siemens.net (md1pvb1c.ad001.siemens.net [139.25.68.40] (may be forged)) by mail2.siemens.de (8.15.2/8.15.2) with ESMTP id w0BCEQnr011260; Thu, 11 Jan 2018 13:14:26 +0100 Date: Thu, 11 Jan 2018 13:14:25 +0100 From: Henning Schild To: Alexander Smirnov Cc: Christopher Larson , Subject: Re: [PATCH] dpkg.bbclass: add lockfile for do_build Message-ID: <20180111131425.4d6035c1@mmd1pvb1c.ad001.siemens.net> In-Reply-To: References: <20180110160409.18273-1-kergoth@gmail.com> X-Mailer: Claws Mail 3.15.0-dirty (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: u4d2790IkXPF Am Thu, 11 Jan 2018 13:31:45 +0300 schrieb Alexander Smirnov : > 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. The fact that Isar uses multiconfig to build many targets from the same tree is not intuitive, we discussed this before. So i am not surprised new contributors get that "wrong". Alex i suggest you split the task and adopt Christophers changes. Christopher, have a look at scripts/ci_build.sh and you will see that Isar is capable of building multiple images at once in the same tree. If you are building 10 images you will have 10 buildchroots that have to be serialized seperately. A feature that probably nobody but the CI-bot will ever use ;). Henning > Alex > > > Signed-off-by: Christopher Larson > > --- > > 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" > > >