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
#\r
for MiscFileObj in Package.GetMiscFileList():\r
for FileObj in MiscFileObj.GetFileList():\r
- MiscFileFullPath = os.path.normpath(os.path.join(os.path.dirname(FullPath), FileObj.GetURI()))\r
+ MiscFileFullPath = os.path.normpath(os.path.join(PackagePath, FileObj.GetURI()))\r
if MiscFileFullPath not in self.FileList:\r
self.FileList.append(MiscFileFullPath)\r
\r
else:\r
Comment = ''\r
if Usage != DT.ITEM_UNDEFINED and GuidType == DT.ITEM_UNDEFINED:\r
- Comment = '## ' + Usage + ' ## GUID ' + Comment\r
+ Comment = '## ' + Usage + Comment\r
elif GuidType == 'Variable':\r
Comment = '## ' + Usage + ' ## ' + GuidType + ':' + VariableName + Comment\r
else:\r
Content = '# ' + ('\n' + '# ').join(GetSplitValueList(SectionContent, '\n'))\r
Content = Content.lstrip()\r
#\r
- # add two empty line after the generated section content to differentiate it between other possible sections\r
+ # add a return to differentiate it between other possible sections\r
# \r
if Content:\r
- Content += '\n#\n#\n'\r
+ Content += '\n'\r
return Content\r
## GenBuildOptions\r
#\r
NewStatement = ""\r
for Line in LineList:\r
# ignore blank comment\r
- if not Line.replace("#", '').strip() and SectionName != 'Defines':\r
+ if not Line.replace("#", '').strip() and SectionName not in ('Defines', 'Hob', 'Event', 'BootMode'):\r
continue\r
# add two space before non-comments line except the comments in Defines section\r
if Line.strip().startswith('#') and SectionName == 'Defines':\r