From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6509455202632859648 X-Received: by 10.25.156.210 with SMTP id f201mr307346lfe.28.1515666715283; Thu, 11 Jan 2018 02:31:55 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.16.130 with SMTP id 2ls1145328ljq.4.gmail; Thu, 11 Jan 2018 02:31:54 -0800 (PST) X-Google-Smtp-Source: ACJfBosE6vDjFqID3SHW3aEaq2meA3BnvSO+h+/EXr2SL3jiFG5GSSdMyhPI89auxn9KmooEHPBX X-Received: by 10.46.53.26 with SMTP id z26mr1645856ljz.33.1515666714858; Thu, 11 Jan 2018 02:31:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515666714; cv=none; d=google.com; s=arc-20160816; b=Ac7bu+5Fk7os313iHhKUn08g8uzlMsQW+uArvpZSoFckDkJl1klNIBuK08wqRzK6SN cMNZWhZGxcgSQv1BUL0y+ZponNbt+KIcIiSIUyeFcrnCUB+UxZhFQmPw9B7Nj4uG9R5u 9We0CFEisjqR1xjKArg1FQj4EL4rDgqKar2r511CvM5UySKs30ddx1eujXUiywSi5knf EKIUVO8+B+26Gi7A0/pG6CyNTcEyx5OXyIkiEvzWTyhdWEUv2f6BwtrslJWIRa91dX5Z VQP6ZB+Wdf6GgkvskVPuzPUuU7iDt2l90KFdvB5Z/OdAvGRCG2UePh6aKeXfxBMdtQfP o2mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :arc-authentication-results; bh=1H0kCiT3GZlxPOZTDBNj74sDdN8m4tSCHEDfNmlCXZg=; b=nUL2WkdbKcgpL2ng8k9X/HPVAxQOwQMPCjLSYtRBuRvZ9Iixclr61lgVEaWeVfdJ+b DRB3QQg6YNCy7LkjM2C/NdRdwNreFJr/eMb/z+aVRxFFltGHYRB1CNx9Sp6Yo7r7UYs3 wTSTiXrRSrOmm9e++OY9nYfL7uLOCG3N1SqMgj85Ki8e7NBc8t+uLhuJ/+fwbR6fu2W9 4KxUKuBt9MyfnhcxeVebOS7ahu/SmHl/Ym8r1m0YKoH/N/82JcVHIJtfqEdihesHG7DL PVV1tGNcHlr2IBZpqJKvP3G6Q6InJ6YJCI6cRTCJmvueqbKzVijGUQUI20G7FYKjplDU 3AbA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id k1si294126lje.4.2018.01.11.02.31.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jan 2018 02:31:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from [10.0.2.15] ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w0BAVoGR018141 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 11 Jan 2018 11:31:52 +0100 Subject: Re: [PATCH] dpkg.bbclass: add lockfile for do_build To: Christopher Larson , isar-users@googlegroups.com References: <20180110160409.18273-1-kergoth@gmail.com> From: Alexander Smirnov Message-ID: Date: Thu, 11 Jan 2018 13:31:45 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20180110160409.18273-1-kergoth@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: gGvhuTQc53RT 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 > --- > 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" >