From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6942815556404772864 X-Received: by 2002:a2e:a231:: with SMTP id i17mr1924900ljm.467.1628754169997; Thu, 12 Aug 2021 00:42:49 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:691e:: with SMTP id e30ls1907585lfc.0.gmail; Thu, 12 Aug 2021 00:42:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyd6REWbrGhDPJoDVBc+vblRa9ix6FuvZ7CmvOU4omIUpJx2yoQoyTU4Yxc8iFijoC1WfNE X-Received: by 2002:a19:f20d:: with SMTP id q13mr1612838lfh.63.1628754168682; Thu, 12 Aug 2021 00:42:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628754168; cv=none; d=google.com; s=arc-20160816; b=mQRc/KQ6E+dRRhliyx9gaiVZikf3geUkaSYABsKjjbW82P6b0xGo6xsxk+by04r6b6 GgF2ICqDJegjA3ztr6Qw0Vq+Us6qFYJvspKhIX9t4Rm0FME6a1r1asjbvEaHPVqZ7lK5 r2sIfIDtP3XiVRjyM1woJAGR6VBja2EVnL33cQVu69lWopvYK6JqFfU+OGzp+shn5Lh9 Vuhraycpxk0H7qW4I9/9BrZ0wO/nA1rMMX0ePomNBzxY5P8rdxfM/j1+ImyiCW7hawpX TOium5IyT9EjeD4iaQ6fn1UIbdALJxbbpZe9uB/y8FvsjUW8j+4U1sfE7xaF5CUs7vP5 KUDw== 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=hQ7ID3iXhw7mvRZxATPQ9ewdxhv9YZSHtDLDi37vMK4=; b=Gow0E47rY3cnKtG/wWHHe+SFUbGWQ33qHYwNT7rdUJSloyl5vNisQ+MYd53g7QxY5z JGpJ+yvXrrmBsVKvV6M3SffIap+Snks9i8WCEA87+fnAimNY3qn8qtncRvSPzbKCNhDb LhFRWkxjUB24j2FKqk1GoqVUx8czdmwgOq9NMX5O6rlVZ0QN9UO/NVR7nIdLWC+24WnR OcjdRg2HYWHY7IVZbsW1GlXb+7ecZzKtA4xts4H3cD/HH0C9gQugmbRt6HBqOCeVCrfy sbCrnmCSfKzxJmSo8wOogClNTzKpjAss0xyIy65mEQYi/SHQYUuLkz/HUnB9Mx4HPeFi yo1g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 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 lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id x17si92744ljp.0.2021.08.12.00.42.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Aug 2021 00:42:48 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 as permitted sender) client-ip=194.138.37.39; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 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 lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id 17C7gljE026249 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Aug 2021 09:42:48 +0200 Received: from [167.87.241.87] ([167.87.241.87]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 17C7glNZ008255; Thu, 12 Aug 2021 09:42:47 +0200 Subject: Re: [PATCH v1 1/2] dpkg: Adjust symlinks for mirrors To: Anton Mikanovich , isar-users@googlegroups.com References: <20210323115002.171050-1-amikan@ilbers.de> <20210323115002.171050-2-amikan@ilbers.de> From: Jan Kiszka Message-ID: <61c0f32b-3369-4e2d-335e-e300ed5f5879@siemens.com> Date: Thu, 12 Aug 2021 09:42:47 +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: <20210323115002.171050-2-amikan@ilbers.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: TECAiMqvdciy On 23.03.21 12:50, Anton Mikanovich wrote: > When bitbake fetch git repository from mirror it creates symlink from > original repository name. This symlink use absolute path, which is not > exist inside chroot when building the package. So we need to adjust this > path just like we do for git alternates path. > > Signed-off-by: Anton Mikanovich > --- > 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 5c7bddc..23dc191 100644 > --- a/meta/classes/dpkg-base.bbclass > +++ b/meta/classes/dpkg-base.bbclass > @@ -26,6 +26,13 @@ python do_adjust_git() { > if ud.type != 'git': > continue > > + if os.path.islink(ud.localpath): > + realpath = os.path.realpath(ud.localpath) > + if realpath.startswith(d.getVar("DL_DIR")): > + link = realpath.replace(d.getVar("DL_DIR"), '/downloads', 1) > + os.unlink(ud.localpath) > + os.symlink(link, ud.localpath) > + > subdir = ud.parm.get("subpath", "") > if subdir != "": > def_destsuffix = "%s/" % os.path.basename(subdir.rstrip('/')) > This is racy and can generate random build breakages if a git repo should be used by multiple recipes. I'll fix this up by locking all adjust_git tasks, which I need for making it compatible it compatible with git-patching anyway. Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux