mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-29 01:21:02 +02:00
sys-apps/dtc: Sync with Gentoo
It's from Gentoo commit 10e61f9331cc7671068445fb19e69d669b7570f0.
This commit is contained in:
parent
1d2510b351
commit
306ca88128
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
EAPI=8
|
EAPI=8
|
||||||
|
|
||||||
PYTHON_COMPAT=( python3_{10..11} )
|
PYTHON_COMPAT=( python3_{10..12} )
|
||||||
inherit meson python-single-r1
|
inherit meson python-single-r1
|
||||||
|
|
||||||
if [[ ${PV} == 9999 ]] ; then
|
if [[ ${PV} == 9999 ]] ; then
|
||||||
@ -44,6 +44,7 @@ DOCS=(
|
|||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}"/${P}-meson-tests.patch
|
"${FILESDIR}"/${P}-meson-tests.patch
|
||||||
"${FILESDIR}"/${P}-meson-macos.patch
|
"${FILESDIR}"/${P}-meson-macos.patch
|
||||||
|
"${FILESDIR}"/fix-tests-for-Python3.12.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
pkg_setup() {
|
pkg_setup() {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
EAPI=8
|
EAPI=8
|
||||||
|
|
||||||
PYTHON_COMPAT=( python3_{10..11} )
|
PYTHON_COMPAT=( python3_{10..12} )
|
||||||
inherit meson python-single-r1
|
inherit meson python-single-r1
|
||||||
|
|
||||||
if [[ ${PV} == 9999 ]] ; then
|
if [[ ${PV} == 9999 ]] ; then
|
||||||
|
43
sdk_container/src/third_party/portage-stable/sys-apps/dtc/files/fix-tests-for-Python3.12.patch
vendored
Normal file
43
sdk_container/src/third_party/portage-stable/sys-apps/dtc/files/fix-tests-for-Python3.12.patch
vendored
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
Description: Python3.12 causes breakage for get_mem_rsv in pylibfdt.
|
||||||
|
|
||||||
|
Author: Héctor Orón Martínez <zumbi@debian.org>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Bug: https://github.com/dgibson/dtc/issues/123
|
||||||
|
Bug-Debian: https://bugs.debian.org/1061318
|
||||||
|
Bug-Ubuntu: https://launchpad.net/bugs/2051399
|
||||||
|
Last-Update: 2024-01-30
|
||||||
|
|
||||||
|
--- device-tree-compiler-1.7.0.orig/tests/pylibfdt_tests.py
|
||||||
|
+++ device-tree-compiler-1.7.0/tests/pylibfdt_tests.py
|
||||||
|
@@ -418,9 +418,14 @@ class PyLibfdtBasicTests(unittest.TestCa
|
||||||
|
def testReserveMap(self):
|
||||||
|
"""Test that we can access the memory reserve map"""
|
||||||
|
self.assertEqual(2, self.fdt.num_mem_rsv())
|
||||||
|
- self.assertEqual([ 0xdeadbeef00000000, 0x100000],
|
||||||
|
- self.fdt.get_mem_rsv(0))
|
||||||
|
- self.assertEqual([123456789, 0o10000], self.fdt.get_mem_rsv(1))
|
||||||
|
+ if sys.version_info.major >= 3 and sys.version_info.minor >= 12:
|
||||||
|
+ self.assertEqual([0, 0xdeadbeef00000000, 0x100000],
|
||||||
|
+ self.fdt.get_mem_rsv(0))
|
||||||
|
+ self.assertEqual([0, 123456789, 0o10000], self.fdt.get_mem_rsv(1))
|
||||||
|
+ else:
|
||||||
|
+ self.assertEqual([0xdeadbeef00000000, 0x100000],
|
||||||
|
+ self.fdt.get_mem_rsv(0))
|
||||||
|
+ self.assertEqual([123456789, 0o10000], self.fdt.get_mem_rsv(1))
|
||||||
|
|
||||||
|
def testEmpty(self):
|
||||||
|
"""Test that we can create an empty tree"""
|
||||||
|
@@ -615,7 +620,10 @@ class PyLibfdtSwTests(unittest.TestCase)
|
||||||
|
|
||||||
|
fdt = sw.as_fdt()
|
||||||
|
self.assertEqual(2, fdt.num_mem_rsv())
|
||||||
|
- self.assertEqual([TEST_ADDR_1, TEST_SIZE_1], fdt.get_mem_rsv(0))
|
||||||
|
+ if sys.version_info.major >= 3 and sys.version_info.minor >= 12:
|
||||||
|
+ self.assertEqual([0, TEST_ADDR_1, TEST_SIZE_1], fdt.get_mem_rsv(0))
|
||||||
|
+ else:
|
||||||
|
+ self.assertEqual([TEST_ADDR_1, TEST_SIZE_1], fdt.get_mem_rsv(0))
|
||||||
|
|
||||||
|
# Make sure we can add a few more things
|
||||||
|
with sw.add_node('another'):
|
Loading…
x
Reference in New Issue
Block a user