BaseTools/Upt: Fix several bugs
1. Fix a bug of packaging a full path file in zip at Linux. 2. Fix a format error of generating Hob/Event/BootMode information. 3. Fix a bug of generating additional “GUID” subtype for “UNDEFINED” guid. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@Intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16149 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -212,7 +212,7 @@ class DistributionPackageClass(object):
|
|||||||
#
|
#
|
||||||
for MiscFileObj in Package.GetMiscFileList():
|
for MiscFileObj in Package.GetMiscFileList():
|
||||||
for FileObj in MiscFileObj.GetFileList():
|
for FileObj in MiscFileObj.GetFileList():
|
||||||
MiscFileFullPath = os.path.normpath(os.path.join(os.path.dirname(FullPath), FileObj.GetURI()))
|
MiscFileFullPath = os.path.normpath(os.path.join(PackagePath, FileObj.GetURI()))
|
||||||
if MiscFileFullPath not in self.FileList:
|
if MiscFileFullPath not in self.FileList:
|
||||||
self.FileList.append(MiscFileFullPath)
|
self.FileList.append(MiscFileFullPath)
|
||||||
|
|
||||||
|
@ -705,7 +705,7 @@ def GenGuidSections(GuidObjList):
|
|||||||
else:
|
else:
|
||||||
Comment = ''
|
Comment = ''
|
||||||
if Usage != DT.ITEM_UNDEFINED and GuidType == DT.ITEM_UNDEFINED:
|
if Usage != DT.ITEM_UNDEFINED and GuidType == DT.ITEM_UNDEFINED:
|
||||||
Comment = '## ' + Usage + ' ## GUID ' + Comment
|
Comment = '## ' + Usage + Comment
|
||||||
elif GuidType == 'Variable':
|
elif GuidType == 'Variable':
|
||||||
Comment = '## ' + Usage + ' ## ' + GuidType + ':' + VariableName + Comment
|
Comment = '## ' + Usage + ' ## ' + GuidType + ':' + VariableName + Comment
|
||||||
else:
|
else:
|
||||||
@ -1027,10 +1027,10 @@ def GenSpecialSections(ObjectList, SectionName):
|
|||||||
Content = '# ' + ('\n' + '# ').join(GetSplitValueList(SectionContent, '\n'))
|
Content = '# ' + ('\n' + '# ').join(GetSplitValueList(SectionContent, '\n'))
|
||||||
Content = Content.lstrip()
|
Content = Content.lstrip()
|
||||||
#
|
#
|
||||||
# add two empty line after the generated section content to differentiate it between other possible sections
|
# add a return to differentiate it between other possible sections
|
||||||
#
|
#
|
||||||
if Content:
|
if Content:
|
||||||
Content += '\n#\n#\n'
|
Content += '\n'
|
||||||
return Content
|
return Content
|
||||||
## GenBuildOptions
|
## GenBuildOptions
|
||||||
#
|
#
|
||||||
|
@ -983,7 +983,7 @@ def GenSection(SectionName, SectionDict, SplitArch=True, NeedBlankLine=False):
|
|||||||
NewStatement = ""
|
NewStatement = ""
|
||||||
for Line in LineList:
|
for Line in LineList:
|
||||||
# ignore blank comment
|
# ignore blank comment
|
||||||
if not Line.replace("#", '').strip() and SectionName != 'Defines':
|
if not Line.replace("#", '').strip() and SectionName not in ('Defines', 'Hob', 'Event', 'BootMode'):
|
||||||
continue
|
continue
|
||||||
# add two space before non-comments line except the comments in Defines section
|
# add two space before non-comments line except the comments in Defines section
|
||||||
if Line.strip().startswith('#') and SectionName == 'Defines':
|
if Line.strip().startswith('#') and SectionName == 'Defines':
|
||||||
|
Reference in New Issue
Block a user