diff options
author | Bob Feng <bob.c.feng@intel.com> | 2020-07-16 19:22:04 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-07-21 04:12:32 +0000 |
commit | b3ee616e67d3fac426f80a4f3f2d7738c6fef779 (patch) | |
tree | 43ef38606d95ded11db14db6fcbc85f1f4b1bd39 | |
parent | 210b29fa9907622f9eb56d98bad9ff25018c913f (diff) | |
download | edk2-b3ee616e67d3fac426f80a4f3f2d7738c6fef779.zip edk2-b3ee616e67d3fac426f80a4f3f2d7738c6fef779.tar.gz edk2-b3ee616e67d3fac426f80a4f3f2d7738c6fef779.tar.bz2 |
BaseTools: Remove the file timestamp checking during parsing
During build, the meta files are not changed, so it's no need
to check file timestamp.
This patch is to remove useless logic.
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
-rw-r--r-- | BaseTools/Source/Python/Workspace/MetaFileTable.py | 12 | ||||
-rw-r--r-- | BaseTools/Source/Python/Workspace/WorkspaceDatabase.py | 16 |
2 files changed, 2 insertions, 26 deletions
diff --git a/BaseTools/Source/Python/Workspace/MetaFileTable.py b/BaseTools/Source/Python/Workspace/MetaFileTable.py index 0555c91..20cb80e 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileTable.py +++ b/BaseTools/Source/Python/Workspace/MetaFileTable.py @@ -46,25 +46,17 @@ class MetaFileTable(): self.TableName = "_%s_%s" % (FileType, len(DB.TblFile))
def IsIntegrity(self):
+ Result = False
try:
TimeStamp = self.MetaFile.TimeStamp
if not self.CurrentContent:
Result = False
else:
Result = self.CurrentContent[-1][0] < 0
- if not Result:
- # update the timestamp in database
- self.DB.SetFileTimeStamp(self.FileId, TimeStamp)
- return False
-
- if TimeStamp != self.DB.GetFileTimeStamp(self.FileId):
- # update the timestamp in database
- self.DB.SetFileTimeStamp(self.FileId, TimeStamp)
- return False
except Exception as Exc:
EdkLogger.debug(EdkLogger.DEBUG_5, str(Exc))
return False
- return True
+ return Result
def SetEndFlag(self):
self.CurrentContent.append(self._DUMMY_)
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py index 9420eaa..d955c78 100644 --- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py +++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py @@ -158,12 +158,6 @@ class WorkspaceDatabase(object): self.BuildObject = WorkspaceDatabase.BuildObjectFactory(self)
self.TransformObject = WorkspaceDatabase.TransformObjectFactory(self)
- def SetFileTimeStamp(self,FileId,TimeStamp):
- self.TblFile[FileId-1][6] = TimeStamp
-
- def GetFileTimeStamp(self,FileId):
- return self.TblFile[FileId-1][6]
-
## Summarize all packages in the database
def GetPackageList(self, Platform, Arch, TargetName, ToolChainTag):
@@ -193,16 +187,6 @@ class WorkspaceDatabase(object): return PackageList
- ## Summarize all platforms in the database
- def PlatformList(self):
- RetVal = []
- for PlatformFile in [item[3] for item in self.TblFile if item[5] == MODEL_FILE_DSC]:
- try:
- RetVal.append(self.BuildObject[PathClass(PlatformFile), TAB_COMMON])
- except:
- pass
- return RetVal
-
def MapPlatform(self, Dscfile):
Platform = self.BuildObject[PathClass(Dscfile), TAB_COMMON]
if Platform is None:
|