/etc/cups/mime.types getting re-written

Michael Sweet mike at easysw.com
Wed Apr 19 06:04:59 PDT 2006


Kurt Pfeifle wrote:
>> Tim Harvey wrote:
>>> I'm having trouble with my cups system where the /etc/cups/mime.types file continues to get re-written, perhaps once a day but I'm not sure.  Every time it gets re-written, I run into the issue here: http://samba.imasd.elmundo.es/samba/docs/man/Samba-HOWTO-Collection/CUPS-printing.html#cups-raw regarding 'application/octet-stream' getting commented.
>>>
>>> What could be causing this?  I'm running on a fairly standard FC4 system:
>>> cups-1.1.23-15.1
>>> samba-3.0.14a-2
>> The file will get rewritten whenever you update CUPS.
>>
>> You probably want to create a separate .types file in /etc/cups with
>> your changes in it (you can duplicate MIME type definitions without
>> difficulties...)
> 
> Uhmm... aren't all the *.types files read in a certain order
> (like, alphabetically)? And doesn't the type definition "win"
> that is read last (in case there are 2 conflicting definitions
> in 2 separate files)? And in case the last file read has a
> "commented out" line for one entry that is there in the default
> mime.types file, this uncommenting is not being honored? (I
> agree that commenting out will happen farely rarely though).

No, the types and rules are cumulative.  For example, if you have
another .types file with a definition for application/postscript,
the rules it defines are added to the ones in the mime.types file.
Similarly, you can just list the same MIME type multiple times in
a single file rather than using the backslash continuation stuff,
for example:

      application/foo foo
      application/foo string(0,foo)

is the same as:

      application/foo foo string(0,foo)

and:

      application/foo foo \
                      string(0,foo)

If you comment lines out in one file, they are just ignored - the
MIME type code treats comment lines as if they did not exist.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com




More information about the cups mailing list