]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/build/build.py
BaseTools:GuidedSectionTools.txt is not generated correctly
[mirror_edk2.git] / BaseTools / Source / Python / build / build.py
index d841fefdc502b1ff9e494d6e64aa8b2ae7aa6751..bec848a7b2e3e8a019581e7c8f943e9fcda7cc84 100755 (executable)
@@ -2347,7 +2347,7 @@ class Build():
                                 toolName = split[3]\r
                                 path = '_'.join(split[0:4]) + '_PATH'\r
                                 path = self.ToolDef.ToolsDefTxtDictionary[path]\r
-                                path = self.GetFullPathOfTool(path)\r
+                                path = self.GetRealPathOfTool(path)\r
                                 guidAttribs.append((guid, toolName, path))\r
 \r
                     # Write out GuidedSecTools.txt\r
@@ -2357,21 +2357,11 @@ class Build():
                         print(' '.join(guidedSectionTool), file=toolsFile)\r
                     toolsFile.close()\r
 \r
-    ## Returns the full path of the tool.\r
+    ## Returns the real path of the tool.\r
     #\r
-    def GetFullPathOfTool (self, tool):\r
+    def GetRealPathOfTool (self, tool):\r
         if os.path.exists(tool):\r
             return os.path.realpath(tool)\r
-        else:\r
-            # We need to search for the tool using the\r
-            # PATH environment variable.\r
-            for dirInPath in os.environ['PATH'].split(os.pathsep):\r
-                foundPath = os.path.join(dirInPath, tool)\r
-                if os.path.exists(foundPath):\r
-                    return os.path.realpath(foundPath)\r
-\r
-        # If the tool was not found in the path then we just return\r
-        # the input tool.\r
         return tool\r
 \r
     ## Launch the module or platform build\r