Message ID | 539bc9d15e32c9574a0c038a6d1d666b5fb40d90.1673453368.git.steve@sakoman.com |
---|---|
State | New |
Headers | show |
Series | [langdale,01/11] grub2: backport patch to fix CVE-2022-2601 CVE-2022-3775 | expand |
diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass index 8203f54519..2d0e35517e 100644 --- a/meta/classes-global/base.bbclass +++ b/meta/classes-global/base.bbclass @@ -139,7 +139,7 @@ def setup_hosttools_dir(dest, toolsvar, d, fatal=True): # /usr/local/bin/ccache/gcc -> /usr/bin/ccache, then which(gcc) # would return /usr/local/bin/ccache/gcc, but what we need is # /usr/bin/gcc, this code can check and fix that. - if "ccache" in srctool: + if os.path.islink(srctool) and os.path.basename(os.readlink(srctool)) == 'ccache': srctool = bb.utils.which(path, tool, executable=True, direction=1) if srctool: os.symlink(srctool, desttool)