From bab80a04a72941b3c53e5fce1f96f5a2fc531280 Mon Sep 17 00:00:00 2001 From: Alfred Wingate Date: Wed, 11 Dec 2024 07:04:19 +0200 Subject: [PATCH] Remove references to application/x-redhat-package-manager libmagic has never referred to x-redhat-package-manager and has had x-rpm since 3.30. Red Hat themselves use x-rpm in their mailcap. https://pagure.io/mailcap/blob/master/f/mime.types Signed-off-by: Alfred Wingate --- patoolib/__init__.py | 1 - patoolib/mime.py | 2 +- tests/test_mime.py | 4 +--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/patoolib/__init__.py b/patoolib/__init__.py index 51f8b4e..9d8bc84 100644 --- a/patoolib/__init__.py +++ b/patoolib/__init__.py @@ -135,7 +135,6 @@ 'application/x-lrzip': 'lrzip', 'application/x-lzh': 'lzh', 'application/x-ms-wim': 'wim', - 'application/x-redhat-package-manager': 'rpm', 'application/x-rpm': 'rpm', 'application/x-rzip': 'rzip', 'application/x-shar': 'shar', diff --git a/patoolib/mime.py b/patoolib/mime.py index 8de9b18..ffad9cd 100644 --- a/patoolib/mime.py +++ b/patoolib/mime.py @@ -272,7 +272,7 @@ def get_file_mime_encoding(parts: Sequence[str]) -> str | None: "lzop compressed data": "application/x-lzop", "Microsoft Cabinet archive data": "application/vnd.ms-cab-compressed", "RAR archive data": "application/vnd.rar", - "RPM ": "application/x-redhat-package-manager", + "RPM ": "application/x-rpm", "POSIX tar archive": "application/x-tar", "xz compressed data": "application/x-xz", "Zip archive data": "application/zip", diff --git a/tests/test_mime.py b/tests/test_mime.py index 287d820..a337f87 100644 --- a/tests/test_mime.py +++ b/tests/test_mime.py @@ -248,9 +248,7 @@ def test_mime_mimedb(self): self.mime_test_mimedb("t.txt.lz4", "application/x-lz4") self.mime_test_mimedb("t.lzo", "application/x-lzop") self.mime_test_mimedb("t.rar", "application/vnd.rar") - self.mime_test_mimedb( - "t.rpm", ("application/x-redhat-package-manager", "application/x-rpm") - ) + self.mime_test_mimedb("t.rpm", "application/x-rpm") self.mime_test_mimedb("t.tar", "application/x-tar") self.mime_test_mimedb("t.cbt", "application/x-tar") self.mime_test_mimedb("t.tar.bz2", "application/x-tar", "bzip2")