summaryrefslogtreecommitdiff
path: root/system/parted/tests-python3.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2022-02-06 18:37:43 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2022-05-01 17:05:51 -0500
commit13566a2f988c3c800a5e1651e248969e37c1e1d0 (patch)
tree41794d36cd441b0720d33f39b10fc9f49c5a8b71 /system/parted/tests-python3.patch
parent2d2dc33f91a1ba3b4bc5d7798ca1386a5bad44a1 (diff)
downloadpackages-13566a2f988c3c800a5e1651e248969e37c1e1d0.tar.gz
packages-13566a2f988c3c800a5e1651e248969e37c1e1d0.tar.bz2
packages-13566a2f988c3c800a5e1651e248969e37c1e1d0.tar.xz
packages-13566a2f988c3c800a5e1651e248969e37c1e1d0.zip
system/parted: Update to 3.4, take
Diffstat (limited to 'system/parted/tests-python3.patch')
-rw-r--r--system/parted/tests-python3.patch68
1 files changed, 0 insertions, 68 deletions
diff --git a/system/parted/tests-python3.patch b/system/parted/tests-python3.patch
deleted file mode 100644
index 8811b7237..000000000
--- a/system/parted/tests-python3.patch
+++ /dev/null
@@ -1,68 +0,0 @@
---- parted-3.2/tests/gpt-header-move.old 2014-06-15 18:27:30.000000000 +0000
-+++ parted-3.2/tests/gpt-header-move 2017-08-19 20:47:02.443283140 +0000
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/env python3
-
- # open img file, subtract 33 from altlba address, and move the last 33 sectors
- # back by 33 sectors
-@@ -11,12 +11,12 @@
- file.seek(512)
- gptheader = file.read(512)
- altlba = unpack_from('<q', gptheader,offset=32)[0]
--gptheader = array.array('c',gptheader)
-+gptheader = array.array('B',gptheader)
- pack_into('<Q', gptheader, 32, altlba-33)
- #zero header crc
- pack_into('<L', gptheader, 16, 0)
- #compute new crc
--newcrc = ((crc32(buffer(gptheader,0,92))) & 0xFFFFFFFF)
-+newcrc = ((crc32(memoryview(gptheader[0:92]))) & 0xFFFFFFFF)
- pack_into('<L', gptheader, 16, newcrc)
- file.seek(512)
- file.write(gptheader)
-@@ -25,7 +25,7 @@
- file.seek(512*(altlba-32))
- backup = file.read(512*32)
- altlba -= 33
--gptheader = array.array('c',gptheader)
-+gptheader = array.array('B',gptheader)
- #update mylba
- pack_into('<Q', gptheader, 24, altlba)
- #update table lba
-@@ -33,7 +33,7 @@
- #zero header crc
- pack_into('<L', gptheader, 16, 0)
- #compute new crc
--newcrc = ((crc32(buffer(gptheader,0,92))) & 0xFFFFFFFF)
-+newcrc = ((crc32(memoryview(gptheader[0:92]))) & 0xFFFFFFFF)
- pack_into('<L', gptheader, 16, newcrc)
- file.seek(512*(altlba-32))
- file.write(backup)
-@@ -38,4 +38,4 @@
- file.seek(512*(altlba-32))
- file.write(backup)
- file.write(gptheader)
--file.write("\0" * (512 * 33))
-+file.write(b"\0" * (512 * 33))
---- parted-3.2/tests/msdos-overlap.old 2014-06-15 18:27:30.000000000 +0000
-+++ parted-3.2/tests/msdos-overlap 2017-08-19 20:48:16.279847771 +0000
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/env python3
- """
- Write an overlapping partition to a msdos disk
-
-@@ -14,10 +14,10 @@
- OFFSET = 0x1b8
-
- if len(sys.argv) < 2:
-- print "%s: <image or device>"
-+ print("%s: <image or device>")
- sys.exit(1)
-
--data = "".join(chr(c) for c in BAD_ENTRY)
-+data = bytearray(BAD_ENTRY)
- with open(sys.argv[1], "rb+") as f:
- f.seek(OFFSET, 0)
- f.write(data)