]> code.ossystems Code Review - openembedded-core.git/commitdiff
base.bbclass: ensure HOSTTOOLS links point to executables
authorRoss Burton <ross.burton@intel.com>
Thu, 30 Mar 2017 13:34:10 +0000 (14:34 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 30 Mar 2017 15:43:19 +0000 (16:43 +0100)
Use the new executable argument to bb.utils.which() to ensure that the symlinks
point to executable files and not for example directories with the right name
which happened to be on $PATH.

[ YOCTO #11256 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/base.bbclass

index cf8748a502fcba7e78c07b1cd9e8af9ceda239db..e29821f199ae842c35fef8a2c29658aa4a2c84b9 100644 (file)
@@ -128,9 +128,9 @@ def setup_hosttools_dir(dest, toolsvar, d, fatal=True):
     for tool in tools:
         desttool = os.path.join(dest, tool)
         if not os.path.exists(desttool):
-            srctool = bb.utils.which(path, tool)
+            srctool = bb.utils.which(path, tool, executable=True)
             if "ccache" in srctool:
-                srctool = bb.utils.which(path, tool, direction=1)
+                srctool = bb.utils.which(path, tool, executable=True, direction=1)
             if srctool:
                 os.symlink(srctool, desttool)
             else: