]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
base: Avoid circular references to our own scripts
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 6 May 2022 15:56:01 +0000 (16:56 +0100)
committerSteve Sakoman <steve@sakoman.com>
Tue, 10 May 2022 18:23:11 +0000 (08:23 -1000)
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>
meta/classes/base.bbclass

index 9ed736b0e16824fbb17e8c247d246a2ff93508a2..19604a464653206e3f8054d841468f8d678d5a00 100644 (file)
@@ -122,6 +122,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: