]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools:Change the path of the file that Binary Cache
authorFan, ZhijuX <zhijux.fan@intel.com>
Fri, 24 May 2019 05:02:18 +0000 (13:02 +0800)
committerFeng, Bob C <bob.c.feng@intel.com>
Mon, 27 May 2019 00:59:04 +0000 (08:59 +0800)
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1806

Current Binary Cache use the PlatformInfo.Name to distinguish
the different platform cache paths in the database folder.

But the different platforms might use the same PLATFORM_NAME
in the DSC files. Different platform caches might overlay each
other inside Binary Cache database if they use same platform name

Use the PlatformInfo.Platform.OutputDirectory instead of the
PlatformInfo.Name can solve the problem.

This patch is going to fix that issue.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
BaseTools/Source/Python/AutoGen/AutoGen.py

index a843f294b94a5e9d643147fc008ee42789583d4d..a5bef4f7c62a0ec3ab7346460bce44c61cc93349 100644 (file)
@@ -3897,7 +3897,7 @@ class ModuleAutoGen(AutoGen):
             self.CopyModuleToCache()\r
 \r
     def CopyModuleToCache(self):\r
-        FileDir = path.join(GlobalData.gBinCacheDest, self.PlatformInfo.Name, self.BuildTarget + "_" + self.ToolChain, self.Arch, self.SourceDir, self.MetaFile.BaseName)\r
+        FileDir = path.join(GlobalData.gBinCacheDest, self.PlatformInfo.OutputDir, self.BuildTarget + "_" + self.ToolChain, self.Arch, self.SourceDir, self.MetaFile.BaseName)\r
         CreateDirectory (FileDir)\r
         HashFile = path.join(self.BuildDir, self.Name + '.hash')\r
         if os.path.exists(HashFile):\r
@@ -3929,7 +3929,7 @@ class ModuleAutoGen(AutoGen):
         for f_ext in self.SourceFileList:\r
             if '.inc' in str(f_ext):\r
                 return False\r
-        FileDir = path.join(GlobalData.gBinCacheSource, self.PlatformInfo.Name, self.BuildTarget + "_" + self.ToolChain, self.Arch, self.SourceDir, self.MetaFile.BaseName)\r
+        FileDir = path.join(GlobalData.gBinCacheSource, self.PlatformInfo.OutputDir, self.BuildTarget + "_" + self.ToolChain, self.Arch, self.SourceDir, self.MetaFile.BaseName)\r
         HashFile = path.join(FileDir, self.Name + '.hash')\r
         if os.path.exists(HashFile):\r
             f = open(HashFile, 'r')\r