From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6491554293275951104 X-Received: by 10.28.12.206 with SMTP id 197mr1257361wmm.10.1511536372755; Fri, 24 Nov 2017 07:12:52 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.139.130 with SMTP id n124ls1962389wmd.10.canary-gmail; Fri, 24 Nov 2017 07:12:52 -0800 (PST) X-Google-Smtp-Source: AGs4zMYLN4lnWDvEBRMuXaseBPn/Lwp4j3hU93YAqKz2upA/pgD4mKHXtDxIWNXLkFKnOhO3dmZZ X-Received: by 10.223.160.17 with SMTP id k17mr1849662wrk.10.1511536372111; Fri, 24 Nov 2017 07:12:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511536372; cv=none; d=google.com; s=arc-20160816; b=iijLQxwM67sU7Ws0rJuHUuSbIHLAfwIVVKL7DU6B0jv/izLXZ8xc6QGFoiLpCkSzSC 8o5Faf24K0fkhbNQJLv5m+HHLlNTV5I3x2sc1HWRmadeCmFuQIsSeFTqPd0dzGvU/MCG A2cF93TxyAhhw6MsTT+EtIR1iElPp9ar2BECCwFrMZkbXTvkjPgyhRVcUs1muf0Tqo9I dwlbs0s68Ggmvq8fFzJGTXayVZNxg64txHcEpLZFj18Cwsp69+kTPu2iBACiUqlYSU02 wUsUnYGrVUd3SohMDb19aF3n8HbZTxG8XtLxyJ3MFtQI3JMwXRV5Bu2Wv0sar0a6+SOF BdKA== 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=z8yyjcniPVG4c4iGYtnGq5GuExdwAOvYPF8kZ3oPJFo=; b=b5favq8XuGBc9wZJFRM4TRIltBAzwhYhUzR3SyFgDxBjH5GQpbW2nhzDvlGvxpI1zw f9ZVVWRZGbT9wsnLzgxCQDCE1gwx7QYvHZcBZbeziz9zpqGkTekcpc4D/y18fTigHebS qP3BkdqPDrYxWAANn12cBPDnTF0h7iI5ljTvcMK6GFISGUJpTBwMY6A/4N/PGOIS0jac /PQ4kOw/jsTP72RGXXMgufvdYCUu7d18hLlvEMmLYMDXRkO33moLngLuMoCk2PxlZjMC jqrN4rYfehU4nuN2pFY177UHEjsqi2ghvx42UXsNMVGq8UeotBff5d50VWP4upzDuwor bVbQ== 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 r6si1165355wrg.2.2017.11.24.07.12.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Nov 2017 07:12:52 -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 vAOFCmQG009628 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 24 Nov 2017 16:12:50 +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> From: Alexander Smirnov Message-ID: <1fa45f93-81e9-312d-00ea-90825bff7110@ilbers.de> Date: Fri, 24 Nov 2017 18:12:43 +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: <20171124155746.5b8f9067@md1em3qc> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: XKsx5pjnK5oD 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. Alex > Henning > >> mkdir -p ${BUILDROOT} >> sudo mount --bind ${WORKDIR} ${BUILDROOT} >> _do_build_cleanup() {