BaseTools: Various typo
Various typo in BaseTools. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Coeur <coeur@gmx.fr> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
committed by
Liming Gao
parent
325ad62260
commit
fb0b35e05f
@ -176,8 +176,8 @@ def UnZipDp(WorkspaceDir, DpPkgFileName, Index=1):
|
||||
# verify MD5 signature when existed
|
||||
#
|
||||
if DistPkg.Header.Signature != '':
|
||||
Md5Sigature = md5(__FileHookOpen__(ContentFile, 'rb').read())
|
||||
if DistPkg.Header.Signature != Md5Sigature.hexdigest():
|
||||
Md5Signature = md5(__FileHookOpen__(ContentFile, 'rb').read())
|
||||
if DistPkg.Header.Signature != Md5Signature.hexdigest():
|
||||
ContentZipFile.Close()
|
||||
Logger.Error("InstallPkg", FILE_CHECKSUM_FAILURE,
|
||||
ExtraData=ContentFile)
|
||||
@ -215,8 +215,8 @@ def GetPackageList(DistPkg, Dep, WorkspaceDir, Options, ContentZipFile, ModuleLi
|
||||
#
|
||||
for Package in PackageList:
|
||||
FilePath = PackageToDec(Package, DistPkg.Header)
|
||||
Md5Sigature = md5(__FileHookOpen__(str(FilePath), 'rb').read())
|
||||
Md5Sum = Md5Sigature.hexdigest()
|
||||
Md5Signature = md5(__FileHookOpen__(str(FilePath), 'rb').read())
|
||||
Md5Sum = Md5Signature.hexdigest()
|
||||
if (FilePath, Md5Sum) not in Package.FileList:
|
||||
Package.FileList.append((FilePath, Md5Sum))
|
||||
|
||||
@ -275,8 +275,8 @@ def GetModuleList(DistPkg, Dep, WorkspaceDir, ContentZipFile, ModuleList):
|
||||
for (Module, Package) in ModuleList:
|
||||
CheckCNameInModuleRedefined(Module, DistPkg)
|
||||
FilePath = ModuleToInf(Module, Package, DistPkg.Header)
|
||||
Md5Sigature = md5(__FileHookOpen__(str(FilePath), 'rb').read())
|
||||
Md5Sum = Md5Sigature.hexdigest()
|
||||
Md5Signature = md5(__FileHookOpen__(str(FilePath), 'rb').read())
|
||||
Md5Sum = Md5Signature.hexdigest()
|
||||
if Package:
|
||||
if (FilePath, Md5Sum) not in Package.FileList:
|
||||
Package.FileList.append((FilePath, Md5Sum))
|
||||
@ -803,8 +803,8 @@ def InstallFile(ContentZipFile, FromFile, ToFile, ReadOnly, Executable=False):
|
||||
else:
|
||||
chmod(ToFile, stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH | stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH)
|
||||
|
||||
Md5Sigature = md5(__FileHookOpen__(str(ToFile), 'rb').read())
|
||||
Md5Sum = Md5Sigature.hexdigest()
|
||||
Md5Signature = md5(__FileHookOpen__(str(ToFile), 'rb').read())
|
||||
Md5Sum = Md5Signature.hexdigest()
|
||||
|
||||
return Md5Sum
|
||||
|
||||
@ -876,8 +876,8 @@ def InstallPackageContent(FromPath, ToPath, Package, ContentZipFile, Dep,
|
||||
chmod(ToFile, stat.S_IRUSR|stat.S_IRGRP|stat.S_IROTH)
|
||||
else:
|
||||
chmod(ToFile, stat.S_IRUSR|stat.S_IRGRP|stat.S_IROTH|stat.S_IWUSR|stat.S_IWGRP|stat.S_IWOTH)
|
||||
Md5Sigature = md5(__FileHookOpen__(str(ToFile), 'rb').read())
|
||||
Md5Sum = Md5Sigature.hexdigest()
|
||||
Md5Signature = md5(__FileHookOpen__(str(ToFile), 'rb').read())
|
||||
Md5Sum = Md5Signature.hexdigest()
|
||||
if (ToFile, Md5Sum) not in Package.FileList:
|
||||
Package.FileList.append((ToFile, Md5Sum))
|
||||
Package.SetIncludeArchList(PackageIncludeArchList)
|
||||
|
Reference in New Issue
Block a user