commit: 82fd76b51c99206b6478bb302bc01f588d061ea3 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> AuthorDate: Thu Mar 5 16:41:36 2026 +0000 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> CommitDate: Thu Mar 5 16:41:36 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82fd76b5
sys-apps/file: backport fixes for magic.py Closes: https://bugs.gentoo.org/970842 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> .../file/{file-5.47.ebuild => file-5.47-r1.ebuild} | 1 + sys-apps/file/files/file-5.47-magic.py.patch | 48 ++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/sys-apps/file/file-5.47.ebuild b/sys-apps/file/file-5.47-r1.ebuild similarity index 99% rename from sys-apps/file/file-5.47.ebuild rename to sys-apps/file/file-5.47-r1.ebuild index 95e3022d87a7..9b1335a9137d 100644 --- a/sys-apps/file/file-5.47.ebuild +++ b/sys-apps/file/file-5.47-r1.ebuild @@ -60,6 +60,7 @@ QA_CONFIG_IMPL_DECL_SKIP=( makedev ) PATCHES=( "${FILESDIR}/file-5.43-seccomp-fstatat64-musl.patch" #789336, not upstream yet "${FILESDIR}/file-5.45-seccomp-sandbox.patch" + "${FILESDIR}/file-5.47-magic.py.patch" ) src_prepare() { diff --git a/sys-apps/file/files/file-5.47-magic.py.patch b/sys-apps/file/files/file-5.47-magic.py.patch new file mode 100644 index 000000000000..1583873e399a --- /dev/null +++ b/sys-apps/file/files/file-5.47-magic.py.patch @@ -0,0 +1,48 @@ +https://bugs.gentoo.org/970842 + +From f70443485d6754b8e4ecb82dae1ec58102ab9dd5 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas <[email protected]> +Date: Tue, 3 Mar 2026 14:55:15 +0000 +Subject: [PATCH] Use self._close Vincent Mihalkovic + +--- + python/magic.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/python/magic.py b/python/magic.py +index 14938281c6..24c32d2ddf 100644 +--- a/python/magic.py ++++ b/python/magic.py +@@ -133,8 +133,8 @@ def close(self): + """ + Closes the magic database and deallocates any resources used. + """ +- if _close: +- _close(self._magic_t) ++ if self._close: ++ self._close(self._magic_t) + + @staticmethod + def __tostr(s): +From f8f8745ccc0fac38561ba7a168c7b5638135bcec Mon Sep 17 00:00:00 2001 +From: Christos Zoulas <[email protected]> +Date: Wed, 4 Mar 2026 10:26:12 +0000 +Subject: [PATCH] convert tab to spaces + +--- + python/magic.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/python/magic.py b/python/magic.py +index 24c32d2dd..1db4a5d01 100644 +--- a/python/magic.py ++++ b/python/magic.py +@@ -127,7 +127,7 @@ class magic_set(Structure): + class Magic(object): + def __init__(self, ms): + self._magic_t = ms +- self._close = _close ++ self._close = _close + + def close(self): + """
