]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/GenFds: remove the old logic since ActivePlatform is abs. path
authorYonghong Zhu <yonghong.zhu@intel.com>
Mon, 18 Apr 2016 07:38:15 +0000 (15:38 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Tue, 19 Apr 2016 10:35:42 +0000 (18:35 +0800)
We can support the DSC file out of workspace. this old logic first make
the absolute path to relative path and strips the leading slash off,
then append it to workspace. it cause GenFds failure on Linux when the
DSC file is out of workspace. Since we make sure the ActivePlatform is
abs. path, so we don't need this old logic to change the abs. path to
relative.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Marvin Haeuser <marvin.haeuser@outlook.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/GenFds/GenFds.py

index d97fc2813dae672e36bdfdadf4aa39a5db2112f4..c2a2bd3760cb1762f8bd75a3fa8367c0f287fad9 100644 (file)
@@ -138,18 +138,10 @@ def main():
 \r
             if not os.path.exists(ActivePlatform)  :\r
                 EdkLogger.error("GenFds", FILE_NOT_FOUND, "ActivePlatform doesn't exist!")\r
-\r
-            if os.path.normcase (ActivePlatform).find(Workspace) == 0:\r
-                ActivePlatform = mws.relpath(ActivePlatform, Workspace)\r
-            if len(ActivePlatform) > 0 :\r
-                if ActivePlatform[0] == '\\' or ActivePlatform[0] == '/':\r
-                    ActivePlatform = ActivePlatform[1:]\r
-            else:\r
-                EdkLogger.error("GenFds", FILE_NOT_FOUND, "ActivePlatform doesn't exist!")\r
         else:\r
             EdkLogger.error("GenFds", OPTION_MISSING, "Missing active platform")\r
 \r
-        GenFdsGlobalVariable.ActivePlatform = PathClass(NormPath(ActivePlatform), Workspace)\r
+        GenFdsGlobalVariable.ActivePlatform = PathClass(NormPath(ActivePlatform))\r
 \r
         if (Options.ConfDirectory):\r
             # Get alternate Conf location, if it is absolute, then just use the absolute directory name\r