aboutsummaryrefslogtreecommitdiffstats
path: root/community/edk2/python39-handle-array-tostring-removal.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/edk2/python39-handle-array-tostring-removal.patch')
-rw-r--r--community/edk2/python39-handle-array-tostring-removal.patch47
1 files changed, 0 insertions, 47 deletions
diff --git a/community/edk2/python39-handle-array-tostring-removal.patch b/community/edk2/python39-handle-array-tostring-removal.patch
deleted file mode 100644
index 9afc5e7de4f..00000000000
--- a/community/edk2/python39-handle-array-tostring-removal.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 43bec9ea3d56f3662ede78023baa2a791b66acac Mon Sep 17 00:00:00 2001
-From: Cole Robinson <crobinso@redhat.com>
-Date: Wed, 12 Aug 2020 01:28:18 +0800
-Subject: [PATCH] BaseTools: Work around array.array.tostring() removal in
- python 3.9
-
-In python3, array.array.tostring() was a compat alias for tobytes().
-tostring() was removed in python 3.9.
-
-Convert this to use tolist() which should be valid for all python
-versions.
-
-This fixes this build error on python3.9:
-
-(Python 3.9.0b5 on linux) Traceback (most recent call last):
- File "/root/edk2/edk2-edk2-stable202002/BaseTools/BinWrappers/PosixLike/../../Source/Python/Trim/Trim.py", line 593, in Main
- GenerateVfrBinSec(CommandOptions.ModuleName, CommandOptions.DebugDir, CommandOptions.OutputFile)
- File "/root/edk2/edk2-edk2-stable202002/BaseTools/BinWrappers/PosixLike/../../Source/Python/Trim/Trim.py", line 449, in GenerateVfrBinSec
- VfrUniOffsetList = GetVariableOffset(MapFileName, EfiFileName, VfrNameList)
- File "/root/edk2/edk2-edk2-stable202002/BaseTools/Source/Python/Common/Misc.py", line 88, in GetVariableOffset
- return _parseForGCC(lines, efifilepath, varnames)
- File "/root/edk2/edk2-edk2-stable202002/BaseTools/Source/Python/Common/Misc.py", line 151, in _parseForGCC
- efisecs = PeImageClass(efifilepath).SectionHeaderList
- File "/root/edk2/edk2-edk2-stable202002/BaseTools/Source/Python/Common/Misc.py", line 1638, in __init__
- if ByteArray.tostring() != b'PE\0\0':
-AttributeError: 'array.array' object has no attribute 'tostring'
-
-Signed-off-by: Cole Robinson <crobinso@redhat.com>
-Reviewed-by: Yuwei Chen <yuwei.chen@intel.com>
-Reviewed-by: Bob Feng <bob.c.feng@intel.com>
----
- BaseTools/Source/Python/Common/Misc.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
-index ad556710802e..4be7957138a5 100755
---- a/BaseTools/Source/Python/Common/Misc.py
-+++ b/BaseTools/Source/Python/Common/Misc.py
-@@ -1635,7 +1635,7 @@ def __init__(self, PeFile):
- ByteArray = array.array('B')
- ByteArray.fromfile(PeObject, 4)
- # PE signature should be 'PE\0\0'
-- if ByteArray.tostring() != b'PE\0\0':
-+ if ByteArray.tolist() != [ord('P'), ord('E'), 0, 0]:
- self.ErrorInfo = self.FileName + ' has no valid PE signature PE00'
- return
-