Package: mailcap
Version: 3.70+nmu1.huji
Severity: normal
Tags: patch
Dear Maintainer,
The function MagicMimetype always fails because the `command -v file` isn't
executed inside a shell (rather, perl searches for the "command" binary, and
fails to find it).
Attached is a patch that fixes this. Somehow I think that `which` was
simpler... :-)
Regards,
Yair.
-- System Information:
Debian Release: 12.5
APT prefers stable-security
APT policy: (990, 'stable-security'), (990, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.6.20-aufs-1 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_IL.UTF-8, LC_CTYPE=en_IL.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages mailcap depends on:
ii media-types 10.0.0
ii perl 5.36.0-7+deb12u1
Versions of packages mailcap recommends:
ii bzip2 1.0.8-5+b1
ii file 1:5.44-3
ii xz-utils 5.4.1-0.2
mailcap suggests no packages.
-- Configuration Files:
/etc/mailcap.order changed [not included]
-- no debconf information
--- a/run-mailcap
+++ b/run-mailcap
@@ -298,7 +298,7 @@
my($file) = @_;
my($typ);
- if (`command -v file`) {
+ if (`command -v 'file'`) {
open(READER, "-|", "file", "-b", "--mime-type", "-e", "tokens", "-L",
"-z", $file);
$typ = <READER>;
chomp $typ;