On Thu, 8 Nov 2001, John Haywood wrote:
> four file browsers (konqueror, gmc, XWC, mc), six browsers (konqueror,
> Netscape, Mozilla, Opera, links, lynx) and a raft of possible helper apps
> (just look at PostScript viewers...)

I know. But if Mandrake would offer this kind of auto-MIME feature
for some of the most popular applications (like Mozilla), everyone
would start thinking that "hey, that's a good idea" and perhaps
join the efford..

> Not saying it couldn't be done, but there'd have to be a heck of a long IF,
> THEN, ELSE parsing the rpm database on a pretty regular basis - not for the
> low-end machine, methinks, and also fairly vulnerable to corruption....

Why? There are easier ways to do the same:

POSTIN: /usr/sbin/mimedb add --priority=5 "mozilla" "text/html"
POSTUN: /usr/sbin/mimedb del "mozilla"
(perhaps we should first look if the executable exists?)

mimedb would be able to add and remove entries in a file
/etc/mime.run or similiar..

Then there would be /usr/bin/mimedb_update which would add the
entries to the config files of every supported program.. Or
better, get the programmers to change their programs to use
/ets/mime.run file by themselves..

> .... although I suppose a package *could* have some sort of optional specfile
> field which gave the mime type(s) handled, then have that stored in a central
> db, but then we're talking 'bout extending rpm, can 'o worms....

But I still like the idea. And it would not be too hard to
add few lines to spec files.. A few at one time, a few at the
another..

Regards,
  Matias



Reply via email to