mirror of https://github.com/acidanthera/audk.git
This patch is going to:
1. Skip the content defined in USER EXTENSION section without raising an error. 2. Wrap os.utime to use two arguments. 3. Add GenFdsCommand for PlatformAutoGen Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15865 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
07b8564b11
commit
0923aa1c3a
|
@ -1962,6 +1962,7 @@ class PlatformAutoGen(AutoGen):
|
|||
BuildRule = property(_GetBuildRule)
|
||||
ModuleAutoGenList = property(_GetModuleAutoGenList)
|
||||
LibraryAutoGenList = property(_GetLibraryAutoGenList)
|
||||
GenFdsCommand = property(_GenFdsCommand)
|
||||
|
||||
## ModuleAutoGen class
|
||||
#
|
||||
|
|
|
@ -48,8 +48,8 @@ def chmod(path, mode):
|
|||
def stat(path):
|
||||
return os.stat(LongFilePath(path))
|
||||
|
||||
def utime(path):
|
||||
return os.utime(LongFilePath(path), None)
|
||||
def utime(path, times):
|
||||
return os.utime(LongFilePath(path), times)
|
||||
|
||||
def listdir(path):
|
||||
List = []
|
||||
|
|
|
@ -266,6 +266,10 @@ class MetaFileParser(object):
|
|||
Line=self._LineIndex + 1, ExtraData=self._CurrentLine);
|
||||
self._ValueList[0:1] = [self._CurrentLine]
|
||||
|
||||
## Skip unsupported data for UserExtension Section
|
||||
def _SkipUserExtension(self):
|
||||
self._ValueList[0:1] = [self._CurrentLine]
|
||||
|
||||
## Section header parser
|
||||
#
|
||||
# The section header is always in following format:
|
||||
|
@ -756,7 +760,7 @@ class InfParser(MetaFileParser):
|
|||
MODEL_EFI_PPI : MetaFileParser._CommonParser,
|
||||
MODEL_EFI_DEPEX : _DepexParser,
|
||||
MODEL_EFI_BINARY_FILE : _BinaryFileParser,
|
||||
MODEL_META_DATA_USER_EXTENSION : MetaFileParser._Skip,
|
||||
MODEL_META_DATA_USER_EXTENSION : MetaFileParser._SkipUserExtension,
|
||||
}
|
||||
|
||||
## DSC file parser class
|
||||
|
@ -796,6 +800,7 @@ class DscParser(MetaFileParser):
|
|||
TAB_ELSE_IF.upper() : MODEL_META_DATA_CONDITIONAL_STATEMENT_ELSEIF,
|
||||
TAB_ELSE.upper() : MODEL_META_DATA_CONDITIONAL_STATEMENT_ELSE,
|
||||
TAB_END_IF.upper() : MODEL_META_DATA_CONDITIONAL_STATEMENT_ENDIF,
|
||||
TAB_USER_EXTENSIONS.upper() : MODEL_META_DATA_USER_EXTENSION,
|
||||
}
|
||||
|
||||
# Valid names in define section
|
||||
|
@ -1205,7 +1210,7 @@ class DscParser(MetaFileParser):
|
|||
MODEL_META_DATA_COMPONENT_SOURCE_OVERRIDE_PATH : self.__ProcessSourceOverridePath,
|
||||
MODEL_META_DATA_BUILD_OPTION : self.__ProcessBuildOption,
|
||||
MODEL_UNKNOWN : self._Skip,
|
||||
MODEL_META_DATA_USER_EXTENSION : self._Skip,
|
||||
MODEL_META_DATA_USER_EXTENSION : self._SkipUserExtension,
|
||||
}
|
||||
|
||||
self._Table = MetaFileStorage(self._RawTable.Cur, self.MetaFile, MODEL_FILE_DSC, True)
|
||||
|
@ -1547,7 +1552,7 @@ class DscParser(MetaFileParser):
|
|||
MODEL_META_DATA_COMPONENT_SOURCE_OVERRIDE_PATH : _CompponentSourceOverridePathParser,
|
||||
MODEL_META_DATA_BUILD_OPTION : _BuildOptionParser,
|
||||
MODEL_UNKNOWN : MetaFileParser._Skip,
|
||||
MODEL_META_DATA_USER_EXTENSION : MetaFileParser._Skip,
|
||||
MODEL_META_DATA_USER_EXTENSION : MetaFileParser._SkipUserExtension,
|
||||
MODEL_META_DATA_SECTION_HEADER : MetaFileParser._SectionHeaderParser,
|
||||
MODEL_META_DATA_SUBSECTION_HEADER : _SubsectionHeaderParser,
|
||||
}
|
||||
|
@ -1576,6 +1581,7 @@ class DecParser(MetaFileParser):
|
|||
TAB_PCDS_FEATURE_FLAG_NULL.upper() : MODEL_PCD_FEATURE_FLAG,
|
||||
TAB_PCDS_DYNAMIC_NULL.upper() : MODEL_PCD_DYNAMIC,
|
||||
TAB_PCDS_DYNAMIC_EX_NULL.upper() : MODEL_PCD_DYNAMIC_EX,
|
||||
TAB_USER_EXTENSIONS.upper() : MODEL_META_DATA_USER_EXTENSION,
|
||||
}
|
||||
|
||||
## Constructor of DecParser
|
||||
|
@ -1860,7 +1866,7 @@ class DecParser(MetaFileParser):
|
|||
MODEL_PCD_DYNAMIC : _PcdParser,
|
||||
MODEL_PCD_DYNAMIC_EX : _PcdParser,
|
||||
MODEL_UNKNOWN : MetaFileParser._Skip,
|
||||
MODEL_META_DATA_USER_EXTENSION : MetaFileParser._Skip,
|
||||
MODEL_META_DATA_USER_EXTENSION : MetaFileParser._SkipUserExtension,
|
||||
}
|
||||
|
||||
##
|
||||
|
|
Loading…
Reference in New Issue