From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6995453036489342976 X-Received: by 2002:a05:600c:35d1:: with SMTP id r17mr2940784wmq.175.1628760278008; Thu, 12 Aug 2021 02:24:38 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5d:6251:: with SMTP id m17ls98566wrv.1.gmail; Thu, 12 Aug 2021 02:24:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMKF85Hz+hoT7PTG7wn1U7miDRquVVYEhj4uPwZaXN03pncMOsqdiaxORd0IVbP2Gf8C9e X-Received: by 2002:adf:ba01:: with SMTP id o1mr2872745wrg.419.1628760276949; Thu, 12 Aug 2021 02:24:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628760276; cv=none; d=google.com; s=arc-20160816; b=x7BayfcvRnDmlMC1Xbagni+6hL9opaYfy/qBEqEWzTFf/bU2on00TUZjU9M8dkoiM0 k6tzMWYfV6ztO5DgaLrXVgJkvsvHHWnfrNKRHuiWHlF3WQoaVz59Ysya5TrQc1IWd8E5 /0jjYAb4pHMiGQvipkIgJvIy+L8LK2GYIPTkkprYZb0b4UiCiVi3f0o8fhZNwIFHp6nR jM9y2C7WRsXfeyfuY8hQrJunhTRKZqOMUfUXlZd26GV1e6pHwuUdWHsQRzBUeVwc0TaB pI3vvCBceBHZdxSG6Dc/OBkCloZcjT/whrc/FkxwwKOyspdglhAwyiKbd8M7XfdePNCT 7mCA== 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:to:subject; bh=Ui4LCWf+NyA1N/bTCQgfAg49SdvFjw8gOpL8Q6GxTLg=; b=fWMfHy9vmJLUIRnlQlp7StVQ1XRHIQXuVFnuV++YOSoG/Q64ylQ7b5aUmRcUyKRizu iHBJ6ob9X2Cm1jQ/1NSavT0lHYB355Y3Scg3GIZwg+7HZujwIIDB4/7mrP0DZXpE41xJ Jj1unhsr7kfLnENoWPxMT2w+u2HF3q4WUetxGzgpyIsS6vLeoxjUvVULVFifphKc0oKE JnhrejmygswQeNAdLu1Rb2p7V6QvTCahZEenQ9csdjdHLyhCFXzgbEQwItt++dY8ZMVO iHwExsk14mc6Wk4YVFELyVUjgyJ377oQLqacxkfzZahtEUiBZRzRqAmrfpxc5XkzUHxC ubFw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id l35si74002wms.1.2021.08.12.02.24.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Aug 2021 02:24:36 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@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 jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id 17C9OavZ005142 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Aug 2021 11:24:36 +0200 Received: from [167.87.241.87] ([167.87.241.87]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 17C9OaIe022473; Thu, 12 Aug 2021 11:24:36 +0200 Subject: Re: [RFC 1/2] dpkg-base: Add new git alternates record instead of replace old one To: Uladzimir Bely , isar-users References: <20210812081030.4505-1-ubely@ilbers.de> <20210812081030.4505-2-ubely@ilbers.de> <81c0fa46-a359-47bd-bed7-866671649c96n@googlegroups.com> From: Jan Kiszka Message-ID: Date: Thu, 12 Aug 2021 11:24:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <81c0fa46-a359-47bd-bed7-866671649c96n@googlegroups.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: D1EgDL4HXdo5 On 12.08.21 11:18, Uladzimir Bely wrote: > Yes, git still shows the message a currently invalid alternate (one of > two records), but it's able to work further (reset --hard, etc). > > But I can agree that this way could be unacceptable due this error message. > Interesting - it actually failed in the past, not only complained. Anyway, just sent my patches. Jan > четверг, 12 августа 2021 г. в 12:00:58 UTC+3, Jan Kiszka: > > On 12.08.21 10:10, Uladzimir Bely wrote: > > Task adjust_git modifies git alternates by replacing DL_DIR to > /downloads. > > New path is used inside buildchroot, so that working git repo > > becomes broken outside buildchroot. > > > > This causes problems with rebuilding such packages as cowsay if > something > > has changed in bitbake environment since previous build: > > > > ERROR: > > mc:qemuarm64-buster:cowsay-git-r0 do_patch: Command Error: 'sh -c > 'git > > > --work-tree=/path/build/tmp/work/debian-buster-arm64/cowsay/git-r0/git > > reset --hard HEAD'' exited with 0 > > > > The solution is to add new path to git alternates so that original > path > > will work outside buildchroot, and new one will work in buildchroot. > > > > Signed-off-by: Uladzimir Bely > > --- > > meta/classes/dpkg-base.bbclass | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/meta/classes/dpkg-base.bbclass > b/meta/classes/dpkg-base.bbclass > > index ec8fbc1..4b9b782 100644 > > --- a/meta/classes/dpkg-base.bbclass > > +++ b/meta/classes/dpkg-base.bbclass > > @@ -46,7 +46,7 @@ python do_adjust_git() { > > > > if os.path.exists(alternates): > > cmd = ["sed", "-i", alternates, "-e", > > - "s|{}|/downloads|".format(d.getVar("DL_DIR"))] > > + "s|\({}\(.*\)\)|\\1\\n/downloads\\2|".format(d.getVar("DL_DIR"))] > > bb.note(' '.join(cmd)) > > if subprocess.call(cmd) != 0: > > bb.fatal("git alternates adjustment failed") > > > > This doesn'tt work, already tried: git fails if just one record is not > working. > > Jan > > -- > Siemens AG, T RDA IOT > Corporate Competence Center Embedded Linux > > -- > You received this message because you are subscribed to the Google > Groups "isar-users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to isar-users+unsubscribe@googlegroups.com > . > To view this discussion on the web visit > https://groups.google.com/d/msgid/isar-users/81c0fa46-a359-47bd-bed7-866671649c96n%40googlegroups.com > . -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux