summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2017-04-27 17:28:11 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-05-18 14:01:46 +0100
commitb71c46f3006ced0c265a84ce5e94eb23d2c57456 (patch)
tree8d1b1f4dedcd2a2f564b55f450d0a18148ad7701 /meta/recipes-extended
parentdcd53ad6f983913878c3b25d46feafc3a6983db9 (diff)
downloadpoky-b71c46f3006ced0c265a84ce5e94eb23d2c57456.tar.gz
parted: move test helper scripts to Python 3
(From OE-Core rev: 2513edb9a804205480b8fbe11e0c289f283627b0) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/parted/files/0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch44
-rw-r--r--meta/recipes-extended/parted/parted_3.2.bb3
2 files changed, 46 insertions, 1 deletions
diff --git a/meta/recipes-extended/parted/files/0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch b/meta/recipes-extended/parted/files/0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch
new file mode 100644
index 0000000000..428b14ed5e
--- /dev/null
+++ b/meta/recipes-extended/parted/files/0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch
@@ -0,0 +1,44 @@
1From 6e82af54714392dcdf74a8aedaae7de7d0af1080 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 27 Apr 2017 16:37:24 +0300
4Subject: [PATCH] Move python helper scripts (used only in tests) to Python 3
5
6Upstream-Status: Pending
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8---
9 tests/gpt-header-move | 2 +-
10 tests/msdos-overlap | 4 ++--
11 2 files changed, 3 insertions(+), 3 deletions(-)
12
13diff --git a/tests/gpt-header-move b/tests/gpt-header-move
14index 05cdc65..3cbcb7e 100755
15--- a/tests/gpt-header-move
16+++ b/tests/gpt-header-move
17@@ -1,4 +1,4 @@
18-#!/usr/bin/python
19+#!/usr/bin/env python3
20
21 # open img file, subtract 33 from altlba address, and move the last 33 sectors
22 # back by 33 sectors
23diff --git a/tests/msdos-overlap b/tests/msdos-overlap
24index 5bddfb0..3de7d2e 100755
25--- a/tests/msdos-overlap
26+++ b/tests/msdos-overlap
27@@ -1,4 +1,4 @@
28-#!/usr/bin/python
29+#!/usr/bin/env python3
30 """
31 Write an overlapping partition to a msdos disk
32
33@@ -14,7 +14,7 @@ BAD_ENTRY = (0x72, 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34 OFFSET = 0x1b8
35
36 if len(sys.argv) < 2:
37- print "%s: <image or device>"
38+ print("%s: <image or device>")
39 sys.exit(1)
40
41 data = "".join(chr(c) for c in BAD_ENTRY)
42--
432.11.0
44
diff --git a/meta/recipes-extended/parted/parted_3.2.bb b/meta/recipes-extended/parted/parted_3.2.bb
index 9ce2dfecd3..73548b7792 100644
--- a/meta/recipes-extended/parted/parted_3.2.bb
+++ b/meta/recipes-extended/parted/parted_3.2.bb
@@ -14,6 +14,7 @@ SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
14 file://0001-Include-fcntl.h-in-platform_defs.h.patch \ 14 file://0001-Include-fcntl.h-in-platform_defs.h.patch \
15 file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ 15 file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
16 file://0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch \ 16 file://0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch \
17 file://0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch \
17 file://parted-3.2-sysmacros.patch \ 18 file://parted-3.2-sysmacros.patch \
18 file://run-ptest \ 19 file://run-ptest \
19 file://Makefile \ 20 file://Makefile \
@@ -46,4 +47,4 @@ do_install_ptest() {
46 sed -e 's| ../parted||' -i $t/tests/*.sh 47 sed -e 's| ../parted||' -i $t/tests/*.sh
47} 48}
48 49
49RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python" 50RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python3"