mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-11-13 03:37:15 +00:00
python3-platformdirs: Fix ptest failures on musl
test_runtime_dir_unreachable_xdg_runtime_dir_warns hardcodes the glibc strerror(ELOOP) text "Too many levels of symbolic links", whereas musl reports "Symbolic link loop". Backport the upstream fix which uses os.strerror() instead. Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
1 parent
2b8a5e012d
commit
4f1d8f85f0
2 files changed
+46
-1
No files matched your search
+43
@@ -0,0 +1,43 @@
|
||||
From c243545c7ee2561ed0b5475c1b43f626d1284111 Mon Sep 17 00:00:00 2001
|
||||
From: Yusuf Efe <120668197+yuefdev@users.noreply.github.com>
|
||||
Date: Wed, 28 Oct 2026 08:45:21 +0300
|
||||
Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20test(unix):=20use=20host=20strerror?=
|
||||
=?UTF-8?q?=20in=20warning=20tests=20(#630)?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
|
||||
|
||||
Upstream-Status: Backport [https://github.com/tox-dev/platformdirs/commit/c243545c7ee2561ed0b5475c1b43f626d1284111]
|
||||
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
|
||||
---
|
||||
tests/test_unix.py | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/test_unix.py b/tests/test_unix.py
|
||||
index e68f2b8..1afb622 100644
|
||||
--- a/tests/test_unix.py
|
||||
+++ b/tests/test_unix.py
|
||||
@@ -1,6 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
+import errno
|
||||
import importlib
|
||||
import inspect
|
||||
import os
|
||||
@@ -401,8 +402,8 @@ _PROBLEMS: typing.Final = {
|
||||
"mode-500": "has mode 0500, not 0700",
|
||||
}
|
||||
_UNREACHABLE: typing.Final = {
|
||||
- "file": "Not a directory",
|
||||
- "symlink-loop": "Too many levels of symbolic links",
|
||||
+ "file": os.strerror(errno.ENOTDIR),
|
||||
+ "symlink-loop": os.strerror(errno.ELOOP),
|
||||
}
|
||||
_DEFAULT_PREFIXES: typing.Final = {
|
||||
"linux": "run/user",
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -7,7 +7,9 @@ SRC_URI[sha256sum] = "05831adf87d392760f4b5c3a0a95579ab5a10b18b9b9bd43680dcb4754
|
||||
|
||||
inherit pypi python_hatchling ptest-python-pytest
|
||||
|
||||
SRC_URI += "file://run-ptest"
|
||||
SRC_URI += "file://run-ptest \
|
||||
file://0001-test-unix-use-host-strerror-in-warning-tests-630.patch \
|
||||
"
|
||||
|
||||
DEPENDS += " \
|
||||
python3-hatch-vcs-native \
|
||||
|
||||
Reference in new issue
Block a user