Skip to content

Commit

Permalink
Remove references to application/x-redhat-package-manager
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
parona-source committed Dec 11, 2024
1 parent 85fafd1 commit bab80a0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion patoolib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion patoolib/mime.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 1 addition & 3 deletions tests/test_mime.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit bab80a0

Please sign in to comment.