## @file\r
# This file is used to parse a xml file of .PKG file\r
#\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials are licensed and made available \r
# under the terms and conditions of the BSD License which accompanies this \r
from Logger.StringTable import ERR_XML_INVALID_EXTERN_SUPMODLIST\r
from Logger.StringTable import ERR_XML_INVALID_EXTERN_SUPMODLIST_NOT_LIB\r
from Logger.StringTable import ERR_FILE_NAME_INVALIDE\r
-from Logger.StringTable import ERR_XML_INVALID_BINARY_FILE_TYPE\r
from Logger.ToolError import PARSER_ERROR\r
from Logger.ToolError import FORMAT_INVALID\r
\r
DpHeader = self.DistP.Header\r
XmlTreeLevel = ['DistributionPackage', 'DistributionHeader']\r
CheckDict = Sdict()\r
+ if DpHeader.GetAbstract():\r
+ DPAbstract = DpHeader.GetAbstract()[0][1]\r
+ else:\r
+ DPAbstract = ''\r
+ if DpHeader.GetCopyright():\r
+ DPCopyright = DpHeader.GetCopyright()[0][1]\r
+ else:\r
+ DPCopyright = ''\r
+ if DpHeader.GetLicense():\r
+ DPLicense = DpHeader.GetLicense()[0][1]\r
+ else:\r
+ DPLicense = ''\r
+ \r
CheckDict['Name'] = DpHeader.GetName()\r
CheckDict['GUID'] = DpHeader.GetGuid()\r
CheckDict['Version'] = DpHeader.GetVersion()\r
- CheckDict['Copyright'] = DpHeader.GetCopyright()\r
- CheckDict['License'] = DpHeader.GetLicense()\r
- CheckDict['Abstract'] = DpHeader.GetAbstract()\r
+ CheckDict['Copyright'] = DPCopyright\r
+ CheckDict['License'] = DPLicense\r
+ CheckDict['Abstract'] = DPAbstract\r
CheckDict['Vendor'] = DpHeader.GetVendor()\r
CheckDict['Date'] = DpHeader.GetDate()\r
CheckDict['XmlSpecification'] = DpHeader.GetXmlSpecification()\r
if Item and len(Item.FileNamList) > 0 and Item.FileNamList[0].FileType == 'FREEFORM':\r
Item.FileNamList[0].FileType = 'SUBTYPE_GUID'\r
Module.GetBinaryFileList()[ItemCount] = Item\r
- if Item and len(Item.FileNamList) > 0 and Item.FileNamList[0].FileType == 'DISPOSABLE':\r
- Logger.Error('\nUPT',\r
- PARSER_ERROR,\r
- ERR_XML_INVALID_BINARY_FILE_TYPE % ('DISPOSABLE'),\r
- RaiseError=True) \r
\r
## ValidateMS3\r
#\r
for PcdExItem in AsBuilt.PcdExValueList:\r
CheckDict = {'TokenSpaceGuidValue':PcdExItem.TokenSpaceGuidValue,\r
'Token':PcdExItem.Token,\r
- 'DatumType':PcdExItem.DatumType,\r
- 'Value':PcdExItem.DefaultValue}\r
+ 'DatumType':PcdExItem.DatumType}\r
XmlTreeLevel = TopXmlTreeLevel + ['BinaryFiles', 'BinaryFile', 'AsBuilt', 'PcdExValue']\r
IsRequiredItemListNull(CheckDict, XmlTreeLevel)\r
#\r