From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6491554293275951104 X-Received: by 10.46.64.77 with SMTP id n74mr1362771lja.2.1511768683599; Sun, 26 Nov 2017 23:44:43 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.66.3 with SMTP id p3ls1757244lja.11.gmail; Sun, 26 Nov 2017 23:44:43 -0800 (PST) X-Google-Smtp-Source: AGs4zMYV2nfKgs54//81a1ZgkDKG2Jvjat0GfO1WrHXsTqIwlXHWTJMTgkbf6cd4y1Mby3xpkVA+ X-Received: by 10.25.150.148 with SMTP id y142mr639876lfd.33.1511768683128; Sun, 26 Nov 2017 23:44:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511768683; cv=none; d=google.com; s=arc-20160816; b=00chuYRIGQ6/ia836VZ6tjdTJQTTAHgyogRXlSecKOzYFN0sp5uKMCBPYfvfCjhA/k N9DLcwCI9r6HHKlW6V6QTZB1/3Y0Udv8ncuWpfQ/8aldUsFV7f0WrlhWytBCXXHj7/Io MPZTWYz6ARQSndhEjkXdMgujK9+dpmf+ginsqpVe0fBwjGkZGSseqNFVlgt/BC4Ufnlr j0Z2B3yVOWEn15aus3XV30AGFyDToUI+32tdE50+ArOwnGMx8ncyaoLHRZS+jn1D9HE0 Kj3wBkXEuRgZyEZGqWFNFEKzahv1gnTqxrnGBBJC8XRaOGI5+uGalUGw+HgdGDB9Dgb5 Ah+w== 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=wFBXu1L5TvoHanzx+dPPo5ScWXGs9bfsjqUiu5ea9mY=; b=dcwaAEyRQrPKbr28WDEENdttHull/ambsJrhiDbP0adjyTens++dDDR6bsVnItepCg wM6RXVPmZO1O2bXSyOt/upfEL4wucrH3ana9XzhAPH4Y8TJCWiAfU0bTN7iM2g3Udm2o Y+gfGdqKSVbalAo5YkD62XDrCvAs+kdQmOaXQ64+g7qLTJrjszxEoTL0TuxBXS0AReGQ B76ANG9SWQfJ7COoZXnJjDqkI1FsET/rOQfPLc4NvHXh4A4PI5DEN8nPT46WX4yoamCZ pV7oio0sntnK6OBqC1WJ69SlYdJ2jW0urpx8ICFJ6Li5zm4iFqsrkf0zqaYOTS92Z+uO yxVw== 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 c69si49358ljd.4.2017.11.26.23.44.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Nov 2017 23:44:43 -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 mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id vAR7igUL026180 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Nov 2017 08:44:42 +0100 Received: from md1em3qc ([167.87.0.164]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id vAR7ifD2014538; Mon, 27 Nov 2017 08:44:42 +0100 Date: Mon, 27 Nov 2017 08:44:41 +0100 From: Henning Schild To: Alexander Smirnov Cc: Subject: Re: [PATCH 4/4 v2] dpkg-base: Update git alternates Message-ID: <20171127084441.725a0d07@md1em3qc> In-Reply-To: <1fa45f93-81e9-312d-00ea-90825bff7110@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> 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: ESN053YdH9Jx 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. Henning > Alex > > > Henning > > > >> mkdir -p ${BUILDROOT} > >> sudo mount --bind ${WORKDIR} ${BUILDROOT} > >> _do_build_cleanup() {