Bug#259652: nautilus: eps file problem

Stewart Jeacocke Stewart Jeacocke <stewart@jeacocke.org.uk>, 259652@bugs.debian.org
Mon, 11 Apr 2005 17:45:55 +0100


--=-qOAZQM4KjhjeOD6Voi6w
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

reassign 259652 shared-mime-info
retitle 259652 EPS and PS priority are equal (EPS should be higher)
tags 259652 = patch
done

On Sun, 2005-04-10 at 22:10 +0100, Michael Graham wrote:
> I have a attached two eps files that cause the problem to occur. One
> was produced by xmgrace and the other by gnuplot. I both case the
> files have be successfully imbeded into a LaTeX document.

This is a bug in /usr/share/mime/packages/freedesktop.org.xml. The
priority of the MIME magic pattern is the same for plain postscript and
encapsulated postscript. Encapsulated postscript is simply postscript
with some extra comment lines (allowing it to be included in other
documents). This means that an encapsulated postscript file is always
detected as postscript.

I have attached a patch which fixes this bug by raising the priority of
the encapsulated postscript magic pattern to 80.

To use it apply it to /usr/share/mime/packages/freedesktop.org.xml, run
update-mime-database /usr/share/mime (as root), then log back into gnome

--=-qOAZQM4KjhjeOD6Voi6w
Content-Disposition: attachment; filename=increase-eps-magic-priority-fdo
Content-Type: text/plain; name=increase-eps-magic-priority-fdo; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

--- freedesktop.org.xml.110405	2005-04-11 16:51:34.169077984 +0100
+++ freedesktop.org.xml	2005-04-11 17:09:50.440419408 +0100
@@ -3687,7 +3687,7 @@
     <comment xml:lang=3D"nn">Encapsulated PostScript-bilete</comment>
     <comment xml:lang=3D"sr">=D0=A3=D0=B3=D1=9A=D0=B5=D0=B6=D0=B4=D0=B5=D0=
=BD=D0=B0 =D0=9F=D0=BE=D1=81=D1=82=D0=A1=D0=BA=D1=80=D0=B8=D0=BF=D1=82 =D1=
=81=D0=BB=D0=B8=D0=BA=D0=B0 (EPS)</comment>
     <comment xml:lang=3D"sv">Inkapslad PostScript-bild</comment>
-    <magic priority=3D"50">
+    <magic priority=3D"80">
       <match value=3D"%!" type=3D"string" offset=3D"0">
         <match value=3D"EPS" type=3D"string" offset=3D"15"/>
       </match>

--=-qOAZQM4KjhjeOD6Voi6w--