From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Cc: Uladzimir Bely <ubely@ilbers.de>,
Henning Schild <henning.schild@siemens.com>
Subject: [PATCH v3 2/4] dpkg-base: Make mirror link relative
Date: Thu, 26 Aug 2021 11:22:57 +0200 [thread overview]
Message-ID: <e89071571ec84406cc29909d7bc90819fe3c23d7.1629969778.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1629969778.git.jan.kiszka@siemens.com>
From: Jan Kiszka <jan.kiszka@siemens.com>
This will allow to use it both from the outer builder context and inside
the buildchroot. No idea why bitbake doesn't do that in the first place.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/classes/dpkg-base.bbclass | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 2cff1b3..ca1dccf 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -28,8 +28,10 @@ python do_adjust_git() {
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)
+ filter_out = os.path.join(d.getVar("DL_DIR"), "git") + "/"
+ if realpath.startswith(filter_out):
+ # make the link relative
+ link = realpath.replace(filter_out, '', 1)
os.unlink(ud.localpath)
os.symlink(link, ud.localpath)
--
2.31.1
next prev parent reply other threads:[~2021-08-26 9:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-26 9:22 [PATCH v3 0/4] Make adjust_git work in both worlds Jan Kiszka
2021-08-26 9:22 ` [PATCH v3 1/4] dpkg-base: Lock do_adjust_git against each other Jan Kiszka
2021-08-26 9:22 ` Jan Kiszka [this message]
2021-08-26 9:22 ` [PATCH v3 3/4] Rework do_adjust_git to support inside and outside usage Jan Kiszka
2021-08-26 9:22 ` [PATCH v3 4/4] Revert "dpkg: adjust task order to allow using "git" for patching" Jan Kiszka
2021-09-09 10:42 ` [PATCH v3 0/4] Make adjust_git work in both worlds Anton Mikanovich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e89071571ec84406cc29909d7bc90819fe3c23d7.1629969778.git.jan.kiszka@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=ubely@ilbers.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox