Bug#443772: shared-mime-info: audio/x-wav and video/x-msvideo conflict in magic file

Stephane DESNEUX anonyme932 at laposte.net
Sun Sep 23 22:32:36 UTC 2007


Package: shared-mime-info
Version: 0.22-2
Severity: normal

A WAV file matches audio/x-wav but also video/x-msvideo (both are defined at priority 50 in /usr/share/mime/magic). 

If I use xdgmime (cvs version) to detect mimetypes *only* with magic numbers (without globs), I get no mimetype at all because the lookup function in xdgmimemagic.c detects multiple mime types with same priority and can't make a decision (the result is discarded: see xdgmimemagic.c:685)

I suppose that tools based on xdgmime (gnome-vfs for example) suffer the same problem but I didn't checked.

I solved the pb easily by adjusting video/x-msvideo magic priority to 49 in /usr/share/mime/packages/freedesktop.org.xml and running update-mime-database.

Perhaps another way to workaround the pb is to make video/x-msvideo match "RIFF" *AND* "AVI" (instead of "RIFF" or "AVI" as stated in xml file line 15516)

Finally, even if I found a workaround or two, I don't know if it's an upstream bug or not. Both the magic
file and the source code to use it are involved. The specification doesn't give a detailed magic matching algorithm...

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (900, 'unstable'), (900, 'testing'), (900, 'stable'), (800, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.22.6-isis (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages shared-mime-info depends on:
ii  libc6                      2.6.1-5       GNU C Library: Shared libraries
ii  libglib2.0-0               2.14.1-2      The GLib library of C routines
ii  libxml2                    2.6.30.dfsg-2 GNOME XML library

shared-mime-info recommends no packages.

-- no debconf information






More information about the pkg-gnome-maintainers mailing list