summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/UPT
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2011-12-16 08:52:13 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2011-12-16 08:52:13 +0000
commit9508d0fa4fb2cd2ff03604bc3b1b1abf8f69ccb6 (patch)
tree3dc08b6387f932234ce051bb1025c914e044341c /BaseTools/Source/Python/UPT
parent7a23f4bc6aa6db6650c791c972753c634275ca52 (diff)
downloadedk2-platforms-9508d0fa4fb2cd2ff03604bc3b1b1abf8f69ccb6.tar.xz
Sync BaseTool trunk (version r2474) into EDKII BaseTools.
Signed-off-by: lgao4 Reviewed-by: gikidy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12883 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/UPT')
-rw-r--r--BaseTools/Source/Python/UPT/BuildVersion.py21
-rw-r--r--BaseTools/Source/Python/UPT/InstallPkg.py2
-rw-r--r--BaseTools/Source/Python/UPT/Library/ParserValidate.py2
-rw-r--r--BaseTools/Source/Python/UPT/Library/String.py29
-rw-r--r--BaseTools/Source/Python/UPT/Parser/InfParser.py2
-rw-r--r--BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py1
6 files changed, 22 insertions, 35 deletions
diff --git a/BaseTools/Source/Python/UPT/BuildVersion.py b/BaseTools/Source/Python/UPT/BuildVersion.py
index fc3239135c..bd5876dd5c 100644
--- a/BaseTools/Source/Python/UPT/BuildVersion.py
+++ b/BaseTools/Source/Python/UPT/BuildVersion.py
@@ -1,3 +1,20 @@
-#This file is for build version number auto generation
+## @file
#
-gBUILD_VERSION = "Build 2460"
+# This file is for build version number auto generation
+#
+# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+#
+# This program and the accompanying materials are licensed and made available
+# under the terms and conditions of the BSD License which accompanies this
+# distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+'''
+Build version information
+'''
+
+gBUILD_VERSION = "Build 2474"
diff --git a/BaseTools/Source/Python/UPT/InstallPkg.py b/BaseTools/Source/Python/UPT/InstallPkg.py
index 1c75dad80b..776196e8ea 100644
--- a/BaseTools/Source/Python/UPT/InstallPkg.py
+++ b/BaseTools/Source/Python/UPT/InstallPkg.py
@@ -403,7 +403,7 @@ def Main(Options = None):
DestFile = os.path.normpath(os.path.join(DestDir, DistFileName))
if os.path.exists(DestFile):
FileName, Ext = os.path.splitext(DistFileName)
- NewFileName = FileName + '_' + DistPkg.Header.GetGuid() + '_' + DistPkg.Header.GetVersion() + '.' + Ext
+ NewFileName = FileName + '_' + DistPkg.Header.GetGuid() + '_' + DistPkg.Header.GetVersion() + Ext
DestFile = os.path.normpath(os.path.join(DestDir, NewFileName))
if os.path.exists(DestFile):
#
diff --git a/BaseTools/Source/Python/UPT/Library/ParserValidate.py b/BaseTools/Source/Python/UPT/Library/ParserValidate.py
index 8efb56a61a..860fb4f1dc 100644
--- a/BaseTools/Source/Python/UPT/Library/ParserValidate.py
+++ b/BaseTools/Source/Python/UPT/Library/ParserValidate.py
@@ -286,7 +286,7 @@ def IsValidInstallPath(Path):
if os.path.isabs(Path):
return False
else:
- if Path[1:2] == ':' or Path.find('\\') >=0:
+ if Path[1:2] == ':':
return False
if os.path.isabs(Path):
return False
diff --git a/BaseTools/Source/Python/UPT/Library/String.py b/BaseTools/Source/Python/UPT/Library/String.py
index 526b2e66b4..2c5853ca93 100644
--- a/BaseTools/Source/Python/UPT/Library/String.py
+++ b/BaseTools/Source/Python/UPT/Library/String.py
@@ -643,35 +643,6 @@ def ConvertToSqlString(StringList):
def ConvertToSqlString2(String):
return String.replace("'", "''")
-## RemoveBlockComment
-#
-# Remove comment block
-#
-# @param Lines: Block Comment Lines
-#
-def RemoveBlockComment(Lines):
- IsFindBlockComment = False
- ReservedLine = ''
- NewLines = []
-
- for Line in Lines:
- Line = Line.strip()
- #
- # Remove comment block
- #
- if Line.find(DataType.TAB_COMMENT_EDK1_START) > -1:
- ReservedLine = GetSplitList(Line, DataType.TAB_COMMENT_EDK1_START, 1)[0]
- IsFindBlockComment = True
- if Line.find(DataType.TAB_COMMENT_EDK1_END) > -1:
- Line = ReservedLine + GetSplitList(Line, DataType.TAB_COMMENT_EDK1_END, 1)[1]
- ReservedLine = ''
- IsFindBlockComment = False
- if IsFindBlockComment:
- NewLines.append('')
- continue
- NewLines.append(Line)
- return NewLines
-
## GetStringOfList
#
# Get String of a List
diff --git a/BaseTools/Source/Python/UPT/Parser/InfParser.py b/BaseTools/Source/Python/UPT/Parser/InfParser.py
index 79f71448ee..fb90c396f7 100644
--- a/BaseTools/Source/Python/UPT/Parser/InfParser.py
+++ b/BaseTools/Source/Python/UPT/Parser/InfParser.py
@@ -339,7 +339,7 @@ class InfParser(InfSectionParser):
#
# Found the first section, No file header.
#
- if not DefineSectionParsedFlag:
+ if DefineSectionParsedFlag and not HeaderCommentEnd:
Logger.Error("InfParser",
FORMAT_INVALID,
ST.ERR_INF_PARSER_HEADER_MISSGING,
diff --git a/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py b/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py
index 20daff0d32..a4a3107366 100644
--- a/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py
+++ b/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py
@@ -750,7 +750,6 @@ class InfPomAlignment(ModuleObject):
BinaryObj = self.Parser.InfBinariesSection.GetBinary()
BinaryData = BinaryObj.keys()
- BinaryData.sort()
#
# If the INF file does not contain a [Sources] section, and the INF file does contain a [Binaries] section,