summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-05-06 16:56:01 +0100
committerSteve Sakoman <steve@sakoman.com>2022-05-09 04:01:07 -1000
commit9f4acb8d8b47349e7a4adbb25842a94c0947469a (patch)
treed8e598cb2e2a63422b93c738ef5c5288877cc85c
parent3fafd22233be8961801fa541969383b5b8444dee (diff)
downloadopenembedded-core-9f4acb8d8b47349e7a4adbb25842a94c0947469a.tar.gz
base: Avoid circular references to our own scripts
We'd like to intercept git calls but we don't want circular references and HOSTTOOLS currently sets them up. Tweak to avoid them. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 52c37e133fa55846aca2248ffcf3a10648dbb8d7) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/classes/base.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 3515720bf9..bdb3ac33c6 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -115,6 +115,10 @@ def setup_hosttools_dir(dest, toolsvar, d, fatal=True):
tools = d.getVar(toolsvar).split()
origbbenv = d.getVar("BB_ORIGENV", False)
path = origbbenv.getVar("PATH")
+ # Need to ignore our own scripts directories to avoid circular links
+ for p in path.split(":"):
+ if p.endswith("/scripts"):
+ path = path.replace(p, "/ignoreme")
bb.utils.mkdirhier(dest)
notfound = []
for tool in tools: