From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6491554293275951104 X-Received: by 10.80.167.162 with SMTP id i31mr7546773edc.9.1511432765939; Thu, 23 Nov 2017 02:26:05 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.80.213.18 with SMTP id u18ls3084498edi.2.gmail; Thu, 23 Nov 2017 02:26:05 -0800 (PST) X-Google-Smtp-Source: AGs4zMYlkr40TxGQUluECBg9NhcEsCjsh/2a+3QQ68ffOHgpKmu+DiJUs75btm0xLMBhnZ7Ix58Z X-Received: by 10.80.163.200 with SMTP id t8mr7502638edb.1.1511432765676; Thu, 23 Nov 2017 02:26:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511432765; cv=none; d=google.com; s=arc-20160816; b=0VCJ94NhsQUHpMXhE3S7DPICBTInRkPGiIcqMJDSIoO9+8dzTvo5iYGaujjlgc/EAF BH8ObYoAEcZg++8p+jf8AA2wqmpvGytJNrR8r5G/MqFTYshh7lnShzZkBIDR0AaXUOok tRuF3M0cJPYtuwK6XAijXAQuwfeJLTqGZICWX1izbmIGttZVXvIXeaipils1Vw6BMGOF GyJ/CDqGHVv5/hUxgFYuUvDeUrK9Jhpuge5uqqFamtcAYliQVzQOOMw6hzkpAYVhYViJ dDGgoFPXd4ajS5jEyqpO8qrYQ/SjkqTl83MkmnY4s6XdLcHfPwf9AQpDqbeYoL+LY7Ct jemA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ehs/kEELnJmgk7tTmYR7xlD4P9eWmVRHBKqddOsXges=; b=R6rsagyhqfI1Vj1+DnfiyrB66dAzDhVu9ASL4SklhU4vcuSOIXtbep4rcEtlmcGuDe Dxfv/qoe+sXNPAE88f3HOaiohooJ3P+wFtJj0dUa6I0s7D83JK8EVGRi1BaqecFx7V04 M04eoJrIzrwZbovbXiSc4odwQM1KdcW60IdgQUXvWZ0ApCkyf2v9NKpgAR/6tNUsFhjG SRbqWRAdTC8X9hzdX1prdYlW5NSjeW71vV5gP/gfySWbJEYnSCojWIHMAO/UHSHuAusR yRpMRAVwYpPfFG2Dt29cd92fQ3LNzWHGoZ5ZkhpTnYxkMWYWIN7NAn4Sh6VTvM+zR2oh CiEA== 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 w21si1442091edl.5.2017.11.23.02.26.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Nov 2017 02:26:05 -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 localhost.localdomain ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id vANAPlsX005990 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Nov 2017 11:25:57 +0100 From: Alexander Smirnov To: isar-users@googlegroups.com Cc: Alexander Smirnov Subject: [PATCH 4/4 v2] dpkg-base: Update git alternates Date: Thu, 23 Nov 2017 13:25:32 +0300 Message-Id: <20171123102532.26274-5-asmirnov@ilbers.de> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20171123102532.26274-1-asmirnov@ilbers.de> References: <20171123102532.26274-1-asmirnov@ilbers.de> X-TUID: FPouM9FH+hy/ 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 + mkdir -p ${BUILDROOT} sudo mount --bind ${WORKDIR} ${BUILDROOT} _do_build_cleanup() { -- 2.9.5