Sync EDKII BaseTools to BaseTools project r1997
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10680 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -43,6 +43,8 @@ import OptRomFileStatement
|
||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||
from Common.BuildToolError import *
|
||||
from Common import EdkLogger
|
||||
from Common.Misc import PathClass
|
||||
from Common.String import NormPath
|
||||
|
||||
import re
|
||||
import os
|
||||
@ -205,6 +207,8 @@ class FdfParser:
|
||||
self.__SkippedChars = ""
|
||||
|
||||
self.__WipeOffArea = []
|
||||
if GenFdsGlobalVariable.WorkSpaceDir == '':
|
||||
GenFdsGlobalVariable.WorkSpaceDir = os.getenv("WORKSPACE")
|
||||
|
||||
## __IsWhiteSpace() method
|
||||
#
|
||||
@ -2145,6 +2149,11 @@ class FdfParser:
|
||||
if not self.__GetNextToken():
|
||||
raise Warning("expected INF file path", self.FileName, self.CurrentLineNumber)
|
||||
ffsInf.InfFileName = self.__Token
|
||||
if ffsInf.InfFileName.replace('$(WORKSPACE)', '').find('$') == -1:
|
||||
#do case sensitive check for file path
|
||||
ErrorCode, ErrorInfo = PathClass(NormPath(ffsInf.InfFileName), GenFdsGlobalVariable.WorkSpaceDir).Validate()
|
||||
if ErrorCode != 0:
|
||||
EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)
|
||||
|
||||
if not ffsInf.InfFileName in self.Profile.InfList:
|
||||
self.Profile.InfList.append(ffsInf.InfFileName)
|
||||
@ -2352,6 +2361,11 @@ class FdfParser:
|
||||
self.__GetSectionData( FfsFileObj, MacroDict)
|
||||
else:
|
||||
FfsFileObj.FileName = self.__Token
|
||||
if FfsFileObj.FileName.replace('$(WORKSPACE)', '').find('$') == -1:
|
||||
#do case sensitive check for file path
|
||||
ErrorCode, ErrorInfo = PathClass(NormPath(FfsFileObj.FileName), GenFdsGlobalVariable.WorkSpaceDir).Validate()
|
||||
if ErrorCode != 0:
|
||||
EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)
|
||||
|
||||
if not self.__IsToken( "}"):
|
||||
raise Warning("expected '}'", self.FileName, self.CurrentLineNumber)
|
||||
@ -2597,6 +2611,11 @@ class FdfParser:
|
||||
if not self.__GetNextToken():
|
||||
raise Warning("expected section file path", self.FileName, self.CurrentLineNumber)
|
||||
DataSectionObj.SectFileName = self.__Token
|
||||
if DataSectionObj.SectFileName.replace('$(WORKSPACE)', '').find('$') == -1:
|
||||
#do case sensitive check for file path
|
||||
ErrorCode, ErrorInfo = PathClass(NormPath(DataSectionObj.SectFileName), GenFdsGlobalVariable.WorkSpaceDir).Validate()
|
||||
if ErrorCode != 0:
|
||||
EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)
|
||||
else:
|
||||
if not self.__GetCglSection(DataSectionObj):
|
||||
return False
|
||||
@ -2684,8 +2703,8 @@ class FdfParser:
|
||||
def __GetGuidAttrib(self):
|
||||
|
||||
AttribDict = {}
|
||||
AttribDict["PROCESSING_REQUIRED"] = False
|
||||
AttribDict["AUTH_STATUS_VALID"] = False
|
||||
AttribDict["PROCESSING_REQUIRED"] = "NONE"
|
||||
AttribDict["AUTH_STATUS_VALID"] = "NONE"
|
||||
if self.__IsKeyword("PROCESSING_REQUIRED") or self.__IsKeyword("AUTH_STATUS_VALID"):
|
||||
AttribKey = self.__Token
|
||||
|
||||
|
Reference in New Issue
Block a user