BaseTools: Clean up source files

1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
Liming Gao
2018-07-05 17:40:04 +08:00
parent 39456d00f3
commit f7496d7173
289 changed files with 10647 additions and 10647 deletions

View File

@ -1,11 +1,11 @@
## @file
# This file is used to define a class object to describe a distribution package
#
# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2011 - 2018, 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
# 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,
@ -50,62 +50,62 @@ class DistributionPackageHeaderObject(IdentificationObject, \
self.Date = ''
self.Signature = 'Md5Sum'
self.XmlSpecification = ''
def GetReadOnly(self):
return self.ReadOnly
def SetReadOnly(self, ReadOnly):
self.ReadOnly = ReadOnly
def GetRePackage(self):
return self.RePackage
def SetRePackage(self, RePackage):
self.RePackage = RePackage
def GetVendor(self):
return self.Vendor
def SetDate(self, Date):
self.Date = Date
def GetDate(self):
return self.Date
def SetSignature(self, Signature):
self.Signature = Signature
def GetSignature(self):
return self.Signature
def SetXmlSpecification(self, XmlSpecification):
self.XmlSpecification = XmlSpecification
def GetXmlSpecification(self):
return self.XmlSpecification
## DistributionPackageClass
#
# @param object: DistributionPackageClass
#
#
class DistributionPackageClass(object):
def __init__(self):
self.Header = DistributionPackageHeaderObject()
#
# {(Guid, Version, Path) : PackageObj}
#
self.PackageSurfaceArea = Sdict()
self.PackageSurfaceArea = Sdict()
#
# {(Guid, Version, Name, Path) : ModuleObj}
#
self.ModuleSurfaceArea = Sdict()
self.ModuleSurfaceArea = Sdict()
self.Tools = MiscFileObject()
self.MiscellaneousFiles = MiscFileObject()
self.UserExtensions = []
self.FileList = []
## Get all included packages and modules for a distribution package
#
#
# @param WorkspaceDir: WorkspaceDir
# @param PackageList: A list of all packages
# @param ModuleList: A list of all modules
@ -132,7 +132,7 @@ class DistributionPackageClass(object):
WsRelPath = os.path.normpath(WsRelPath)
if ModuleList and WsRelPath in ModuleList:
Logger.Error("UPT",
OPTION_VALUE_INVALID,
OPTION_VALUE_INVALID,
ST.ERR_NOT_STANDALONE_MODULE_ERROR%\
(WsRelPath, PackageFile))
Filename = os.path.normpath\
@ -140,12 +140,12 @@ class DistributionPackageClass(object):
os.path.splitext(Filename)
#
# Call INF parser to generate Inf Object.
# Actually, this call is not directly call, but wrapped by
# Actually, this call is not directly call, but wrapped by
# Inf class in InfPomAlignment.
#
try:
ModuleObj = InfPomAlignment(Filename, WorkspaceDir, PackageObj.GetPackagePath())
#
# Add module to package
#
@ -161,7 +161,7 @@ class DistributionPackageClass(object):
ST.WRN_EDK1_INF_FOUND%Filename)
else:
raise
self.PackageSurfaceArea\
[(PackageObj.GetGuid(), PackageObj.GetVersion(), \
PackageObj.GetCombinePath())] = PackageObj
@ -176,16 +176,16 @@ class DistributionPackageClass(object):
try:
ModuleObj = InfPomAlignment(ModuleFileFullPath, WorkspaceDir)
ModuleKey = (ModuleObj.GetGuid(),
ModuleObj.GetVersion(),
ModuleObj.GetName(),
ModuleKey = (ModuleObj.GetGuid(),
ModuleObj.GetVersion(),
ModuleObj.GetName(),
ModuleObj.GetCombinePath())
self.ModuleSurfaceArea[ModuleKey] = ModuleObj
except FatalError as ErrCode:
if ErrCode.message == EDK1_INF_ERROR:
Logger.Error("UPT",
EDK1_INF_ERROR,
ST.WRN_EDK1_INF_FOUND%ModuleFileFullPath,
ST.WRN_EDK1_INF_FOUND%ModuleFileFullPath,
ExtraData=ST.ERR_NOT_SUPPORTED_SA_MODULE)
else:
raise
@ -193,16 +193,16 @@ class DistributionPackageClass(object):
# Recover WorkspaceDir
WorkspaceDir = Root
## Get all files included for a distribution package, except tool/misc of
## Get all files included for a distribution package, except tool/misc of
# distribution level
#
#
# @retval DistFileList A list of filepath for NonMetaDataFile, relative to workspace
# @retval MetaDataFileList A list of filepath for MetaDataFile, relative to workspace
#
def GetDistributionFileList(self):
MetaDataFileList = []
SkipModulesUniList = []
for Guid, Version, Path in self.PackageSurfaceArea:
Package = self.PackageSurfaceArea[Guid, Version, Path]
PackagePath = Package.GetPackagePath()
@ -221,7 +221,7 @@ class DistributionPackageClass(object):
MiscFileFullPath = os.path.normpath(os.path.join(PackagePath, FileObj.GetURI()))
if MiscFileFullPath not in self.FileList:
self.FileList.append(MiscFileFullPath)
Module = None
ModuleDict = Package.GetModuleDict()
for Guid, Version, Name, Path in ModuleDict:
@ -262,12 +262,12 @@ class DistributionPackageClass(object):
for NonMetaDataFile in NonMetaDataFileList:
if NonMetaDataFile not in self.FileList:
self.FileList.append(NonMetaDataFile)
for SkipModuleUni in SkipModulesUniList:
if SkipModuleUni in self.FileList:
self.FileList.remove(SkipModuleUni)
return self.FileList, MetaDataFileList