]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/Upt: Fix several bugs
authorHess Chen <hesheng.chen@intel.com>
Fri, 19 Sep 2014 02:04:08 +0000 (02:04 +0000)
committerhchen30 <hchen30@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 19 Sep 2014 02:04:08 +0000 (02:04 +0000)
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

BaseTools/Source/Python/UPT/Core/DistributionPackageClass.py
BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py
BaseTools/Source/Python/UPT/Library/Parsing.py

index 6db13b06b69bac2b23fb7f1e0810afb943556550..bfe6dcc70feaab74840d1a6cf55f460874ea753f 100644 (file)
@@ -212,7 +212,7 @@ class DistributionPackageClass(object):
             #\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
index 2a11204f7d203ac9859a6fc2265786fc473f12fd..698089287498f494a0ea621940a6934a5dad22b5 100644 (file)
@@ -705,7 +705,7 @@ def GenGuidSections(GuidObjList):
             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
@@ -1027,10 +1027,10 @@ def GenSpecialSections(ObjectList, SectionName):
         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
index db0fec3a73cc04eab10f3b52d5dddd6577a2c235..ace3e0d11841a0e1cdaeed7d32a364e701147722 100644 (file)
@@ -983,7 +983,7 @@ def GenSection(SectionName, SectionDict, SplitArch=True, NeedBlankLine=False):
                 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