From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6491554293275951104 X-Received: by 10.25.72.87 with SMTP id v84mr1218433lfa.44.1511797370622; Mon, 27 Nov 2017 07:42:50 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.48.20 with SMTP id w20ls1941772ljw.15.gmail; Mon, 27 Nov 2017 07:42:50 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ1alnxjE3N4u+SqG+GwtFhnynyntBIB8merFyklT/EhOWGf+sg3XzBuZCFUcrThkkDY9xq X-Received: by 10.25.141.204 with SMTP id p195mr1185275lfd.8.1511797370100; Mon, 27 Nov 2017 07:42:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511797370; cv=none; d=google.com; s=arc-20160816; b=g7+/Jf+fp9Df5mrwZ5vGUY6Lgjn7t9M7W7MWZ3GFqPfge6WcformlqnMxBocuqE4+b aw40YD+/3uVj91LCD/knwjpqvUl8QlMKaRHs2HDQoQtK0xDqTkiXiUw31n9WukhUduf0 9CcidxGTL0KmUThpUE1dAGjoV9yxnyq+sudzLQg+Kpqri3edoolweRsXgeS37aigZ35d 209vCPms+wGafZfVjH7eIj5OpSd+xqlY1hy3SbLvdc9JqQD7i83mTHgLvXpVN4XYKgAd fYNXchlS/+hIdDHyYGJsD6guAJkxHJIv7WXskHA6AlHUfVEGN5h93E/J9hW5lN8j6Uas 7OXA== 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=Pe/0h4IP59PHRvzTu5NqaK1DVVBmNCYuffaGptJdlTE=; b=Ix00XLjCmVvVhC2zECrJiI8Q7YMWO6Zo2YrzsuFtLzpiVzKNXDFJehjVEGqs+JUGFk toNgXvGJDNT0uPNpEJMaQUUraz5ufa8gRiTkIStuFZP75sXnMXT2EpY9lYoZdsM/LnA+ PZkqYy6Tq7OVg+NyzzFPO6Hf8zS11ZKy7rTVMrgLrZxb3rCKiRxGFEKtVQMaHbEf5MXz QG26gvNlfLf3YQyBPVFUBHOzPiY+aXVDd7Ahn6EauNhL4RtKNWPh0JqQfIcUipRbXbsE /NnaRVl4s75Nt+H79P0Ng80J5QOpCKATM924kRu4cSAjUHJdMIuT3H9jyjmdC3YZ0N03 2FCA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id g77si1169246lfl.5.2017.11.27.07.42.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Nov 2017 07:42:50 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id vARFgnnL027741 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Nov 2017 16:42:49 +0100 Received: from md1em3qc (md1pvb1c.ad001.siemens.net [139.25.68.40] (may be forged)) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id vARFgnqC003426; Mon, 27 Nov 2017 16:42:49 +0100 Date: Mon, 27 Nov 2017 16:42:48 +0100 From: Henning Schild To: Alexander Smirnov Cc: Subject: Re: [PATCH 4/4 v2] dpkg-base: Update git alternates Message-ID: <20171127164248.78ef8955@md1em3qc> In-Reply-To: <914f6cf4-f91d-bdef-d169-3688f6f01346@ilbers.de> 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> <914f6cf4-f91d-bdef-d169-3688f6f01346@ilbers.de> X-Mailer: Claws Mail 3.13.2 (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: TF0ngBNM5iGd Am Mon, 27 Nov 2017 11:03:47 +0300 schrieb Alexander Smirnov : > 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. I see, in that case i have no objections. Thanks, Henning > Alex