From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6491554293275951104 X-Received: by 10.46.34.2 with SMTP id i2mr1207254lji.44.1511769837009; Mon, 27 Nov 2017 00:03:57 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.20.11 with SMTP id u11ls1370885ljd.9.gmail; Mon, 27 Nov 2017 00:03:56 -0800 (PST) X-Google-Smtp-Source: AGs4zMakChBpf0z2bbzUNVEIjxveemVSljWe0U0AFGkrlertrigugkfjYYtPFmEGVc2YPArayA+L X-Received: by 10.25.190.74 with SMTP id o71mr1174426lff.15.1511769836689; Mon, 27 Nov 2017 00:03:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511769836; cv=none; d=google.com; s=arc-20160816; b=FM5BT24qEsBNFfBxx5kUVE17U+Yt1VZj9953++RoQ1KTpVgQpwmi8j6YDooVX4X0uJ lyBXHacCQBrmhJ/RhNNmm+9fbvUh8hS/vChYNpyAlVptPg7sR4rjvs+z3FoatFQM4I/S xf6OAPjgwMvR4fdxTMj4OcBsFzR0rjQd524xfbC8nPIN1Y6P1L1eHwmxCK/ZQrSWWhDF ACDi6cXbtRyZUW7ekgtL9iHaBCuC0nZJFx87vTxSkPpsKmQdAIbCWSjQgtPcxwqo3zE/ uFDCD5vtrp/kwhj3sXYz6A6JoyQBYDNIAywK7mv28IkwEunFQwtqtHG/Tr5bS5gCeaiH GuWQ== 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:cc:to:subject :arc-authentication-results; bh=+tdJdNz/Zb01KQrBMp6edKKz+TUbbzQI5gRhr5F1gp4=; b=Fve/SbTJHfDmjpLottTb+UfA76NDgSh4u8QO8pZBQpWLiAmgLv2blJjNwKAu6Ur9rm TWRS6s3PraGPe/L/ZelJZKKyGu5Af3Qusb/6eFYL88L69wOWFv0aPuNqBH9Nn9ZHXtUe xyeSLZCF0ntTvvGurfD/py57VJj6AB0fr6q6n6STq9VodVcWA+fN8Ow46DZNvjtQcH8G OOtKZnRnteotY7k+iW2VpcGO/roYclMMIJqpKqutilFQIPrcIZFiFn0Btv2aj2aznbKt a7Kqi1+Av7m2PQqgu7bYHhEw5OtF1QOfWV3VP+Uw+c6EHBBIjVIe6ZVbNbfapyaxp2db bHFw== 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 n75si70099ljb.0.2017.11.27.00.03.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Nov 2017 00:03:56 -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 vAR83qKV018243 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 27 Nov 2017 09:03:54 +0100 Subject: Re: [PATCH 4/4 v2] dpkg-base: Update git alternates To: Henning Schild Cc: isar-users@googlegroups.com References: <20171123102532.26274-1-asmirnov@ilbers.de> <20171123102532.26274-5-asmirnov@ilbers.de> <20171124155746.5b8f9067@md1em3qc> <1fa45f93-81e9-312d-00ea-90825bff7110@ilbers.de> <20171127084441.725a0d07@md1em3qc> From: Alexander Smirnov Message-ID: <914f6cf4-f91d-bdef-d169-3688f6f01346@ilbers.de> Date: Mon, 27 Nov 2017 11:03:47 +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: <20171127084441.725a0d07@md1em3qc> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: wvhTFlAjuxFc On 11/27/2017 10:44 AM, Henning Schild wrote: > Am Fri, 24 Nov 2017 18:12:43 +0300 > schrieb Alexander Smirnov : > >> On 11/24/2017 05:57 PM, Henning Schild wrote: >>> Am Thu, 23 Nov 2017 13:25:32 +0300 >>> schrieb Alexander Smirnov : >>> >>>> Update git alternates to work in buildchroot. >>>> >>>> Signed-off-by: Alexander Smirnov >>>> --- >>>> meta/classes/dpkg-base.bbclass | 7 +++++++ >>>> 1 file changed, 7 insertions(+) >>>> >>>> diff --git a/meta/classes/dpkg-base.bbclass >>>> b/meta/classes/dpkg-base.bbclass index 21ae88d..d51a709 100644 >>>> --- a/meta/classes/dpkg-base.bbclass >>>> +++ b/meta/classes/dpkg-base.bbclass >>>> @@ -18,6 +18,13 @@ dpkg_runbuild() { >>>> >>>> # Wrap the function dpkg_runbuild with the bind mount for >>>> buildroot do_build() { >>>> + if [ -d ${WORKDIR}/git/.git ]; then >>>> + OBJ_PATH=$(cat >>>> ${WORKDIR}/git/.git/objects/info/alternates) >>>> + REPO_PATH=$(dirname $OBJ_PATH) >>>> + REPO_NAME=$(basename $REPO_PATH) >>>> + echo "/git/$REPO_NAME/objects" > >>>> ${WORKDIR}/git/.git/objects/info/alternates >>>> + fi >>> >>> Does that not overwrite a file so that the repo can now work only in >>> buildchroot and will be broken on the host? >>> >> >> It does, but in general there is no use-case for having working repo >> clone on the host. I could restore original alternates in cleanup >> hook, but it really makes no sense. > > I do not like breaking that clone, even for a short while and repairing > it later. > The host-clone might be looked at while debugging. > And one could imagine the fetcher/unpacker supporting deduplication if > multiple recipes use the same repo. Even if such a feature is not > present in bitbake today, if it is implemented Isar will break. Think > one recipe being in do_build and another one in do_fetch at the same > time. Don't understand what you mean, but probably the following items could better describe what happens in this patch: 1. There is Isar downloads folder 'tmp/downloads', which contains git clones from origins. 2. There is workdir folder per recipe, which contains git clone from Isar downloads folder. 3. The patch modifies clone in workdir, so the only current recipe is user for this repo. 4. The downloads folder content stays unmodified for all the time. Alex