Bug 6577 - files starting with % are ambiguously defined
Summary: files starting with % are ambiguously defined
Status: RESOLVED FIXED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: high major
Assignee: Jonathan Blandford
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-13 07:05 UTC by Allison Lortie (desrt)
Modified: 2006-07-06 08:26 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Allison Lortie (desrt) 2006-04-13 07:05:03 UTC
the current shared-mime-info (0.17-0ubuntu7) contains 3 possible matches (all at
the same priority, 50) for files starting with "%"

TEX
matlab
PDF

this causes PDF files to have their typed detected as octet-stream.

The TeX/matlab matches should have their priority lowered so that the more
specific "%PDF-" string will match with higher priority.

TeX and matlab having the same magic detection string seems vaguely useless,
though.....
Comment 1 Allison Lortie (desrt) 2006-04-13 07:10:43 UTC
Note: postscript starts like "%!PS-Adobe-2.0" and is similarly broken by this bug.
Comment 2 Gérard Milmeister 2006-04-14 10:28:56 UTC
I can confirm this with shared-mime-info-0.17-1.fc5.1,
on Fedora Core 5. Some PDFs are correctly identified,
others as text. I increased the priority for PDF from 50 to 60,
now all PDFs are correctly identified by nautilus.
Comment 3 Bernhard Kleine 2006-04-24 02:05:33 UTC
(In reply to comment #2)
> I can confirm this with shared-mime-info-0.17-1.fc5.1,
> on Fedora Core 5. Some PDFs are correctly identified,
> others as text. I increased the priority for PDF from 50 to 60,
> now all PDFs are correctly identified by nautilus.

Could you please tell me where to increase the priority, I have some serious
troubles sending pdf which are not properly identified via email. 

Bernhard Kleine
Comment 4 Tom Parker 2006-05-18 22:59:44 UTC
Confirm on Debian unstable (shared-mime-info 0.17-1 package). Changing the glob
priority of PDF from 50 to 60 fixes the problem. Any progress on getting this
actually noticed by someone with commit privs?
Comment 5 alexl 2006-06-23 00:58:02 UTC
Here's the downstream report on Fedora Core 5:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=193582

Interestingly enough 0.17-1.fc5.1 was supposed to fix a postscript vs. matlab
problem:

* Wed Mar 22 2006 Matthias Clasen <mclasen@redhat.com> - 0.17-1.fc5.1
- Backport upstream change to fix postscript vs. matlab confusion
Comment 6 Joachim Frieben 2006-06-23 05:15:38 UTC
The issue is also solved by upgrading "shared-mime-info" to current "CVS",
as I had pointed out in:

  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=190858#c6

The "RPM" package built accordingly on 05/25/06 behaves correctly.
Comment 7 alexl 2006-06-23 05:34:53 UTC
(In reply to comment #6)
> The issue is also solved by upgrading "shared-mime-info" to current "CVS",
> as I had pointed out in:

Since it looks like it's been fixed in freedesktop's CVS, by this change:

http://webcvs.freedesktop.org/mime/shared-mime-info/freedesktop.org.xml.in?r1=1.138&r2=1.139

it should be marked closed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.