From 08dd311f5dc735c595d39faf2e6f7e2810bb79a9 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Mon, 11 Oct 2010 06:26:52 +0000 Subject: Sync EDKII BaseTools to BaseTools project r2065. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10915 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Source/Python/Workspace/WorkspaceDatabase.py | 37 +++++++--------------- 1 file changed, 11 insertions(+), 26 deletions(-) (limited to 'BaseTools/Source/Python/Workspace/WorkspaceDatabase.py') diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py index dad6ecd49a..9d53fa8e68 100644 --- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py +++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py @@ -141,7 +141,6 @@ class DscBuildData(PlatformBuildClassObject): self._BuildOptions = None self._LoadFixAddress = None self._VpdToolGuid = None - self._VpdFileName = None ## Get architecture def _GetArch(self): @@ -204,9 +203,7 @@ class DscBuildData(PlatformBuildClassObject): uuid.UUID(Record[1]) except: EdkLogger.error("build", FORMAT_INVALID, "Invalid GUID format for VPD_TOOL_GUID", File=self.MetaFile) - self._VpdToolGuid = Record[1] - elif Name == TAB_DSC_DEFINES_VPD_FILENAME: - self._VpdFileName = Record[1] + self._VpdToolGuid = Record[1] # set _Header to non-None in order to avoid database re-querying self._Header = 'DUMMY' @@ -350,16 +347,7 @@ class DscBuildData(PlatformBuildClassObject): if self._VpdToolGuid == None: self._VpdToolGuid = '' return self._VpdToolGuid - - ## Retrieve the VPD file Name, this is optional in DSC file - def _GetVpdFileName(self): - if self._VpdFileName == None: - if self._Header == None: - self._GetHeaderInfo() - if self._VpdFileName == None: - self._VpdFileName = '' - return self._VpdFileName - + ## Retrieve [SkuIds] section information def _GetSkuIds(self): if self._SkuIds == None: @@ -802,8 +790,7 @@ class DscBuildData(PlatformBuildClassObject): BsBaseAddress = property(_GetBsBaseAddress) RtBaseAddress = property(_GetRtBaseAddress) LoadFixAddress = property(_GetLoadFixAddress) - VpdToolGuid = property(_GetVpdToolGuid) - VpdFileName = property(_GetVpdFileName) + VpdToolGuid = property(_GetVpdToolGuid) SkuIds = property(_GetSkuIds) Modules = property(_GetModules) LibraryInstances = property(_GetLibraryInstances) @@ -1330,18 +1317,16 @@ class InfBuildData(ModuleBuildClassObject): if Name in self: self[Name] = Record[1] # some special items in [Defines] section need special treatment - elif Name in ('EFI_SPECIFICATION_VERSION', 'UEFI_SPECIFICATION_VERSION'): - if self._Specification == None: - self._Specification = sdict() - self._Specification['UEFI_SPECIFICATION_VERSION'] = Record[1] - elif Name == 'EDK_RELEASE_VERSION': + elif Name in ('EFI_SPECIFICATION_VERSION', 'UEFI_SPECIFICATION_VERSION', 'EDK_RELEASE_VERSION', 'PI_SPECIFICATION_VERSION'): + if Name in ('EFI_SPECIFICATION_VERSION', 'UEFI_SPECIFICATION_VERSION'): + Name = 'UEFI_SPECIFICATION_VERSION' if self._Specification == None: self._Specification = sdict() - self._Specification[Name] = Record[1] - elif Name == 'PI_SPECIFICATION_VERSION': - if self._Specification == None: - self._Specification = sdict() - self._Specification[Name] = Record[1] + self._Specification[Name] = GetHexVerValue(Record[1]) + if self._Specification[Name] == None: + EdkLogger.error("build", FORMAT_NOT_SUPPORTED, + "'%s' format is not supported for %s" % (Record[1], Name), + File=self.MetaFile, Line=Record[-1]) elif Name == 'LIBRARY_CLASS': if self._LibraryClass == None: self._LibraryClass = [] -- cgit v1.2.3