]> git.donarmstrong.com Git - debian/debian-policy.git/commitdiff
Rely on triggers instead of calling update-mime
authorCharles Plessy <plessy@debian.org>
Thu, 1 Mar 2012 13:58:41 +0000 (22:58 +0900)
committerRuss Allbery <rra@debian.org>
Mon, 3 Sep 2012 20:08:31 +0000 (13:08 -0700)
Closes: 661816
This patch also:

 - Removes mention of the MIME policy.  This is a leftover from its removal.
 - Documents /usr/lib/mime/packages/, and recommends to use binary package
   names as a file names.
 - Cosmetically changes the emphasis on a "should not".

policy.sgml

index 43926534da730cac53b3f8dcd6ae16b0e9f1f441..9479fc9d5ef3269fcdcbfdbae965a9d8b59217b8 100644 (file)
@@ -8038,33 +8038,27 @@ Reloading <var>description</var> configuration...done.
        </p>
 
        <p>
-         Packages which provide the ability to view/show/play,
-         compose, edit or print MIME types should register themselves
-         as such following the current MIME support policy.
+         Packages which provide programs to view/show/play, compose, edit or
+         print MIME types should register them as such by placing a file in
+         <manref name="mailcap" section="5"> format (RFC 1524) in the directory
+         <file>/usr/lib/mime/packages/</file>.  The file name should be the
+         binary package's name.
        </p>
 
        <p>
          The <package>mime-support</package> package provides the
-         <prgn>update-mime</prgn> program which allows packages to
-         register programs that can show, compose, edit or print
-         MIME types.
-       </p>
-
-       <p>
-         Packages containing such programs must register them
-         with <prgn>update-mime</prgn> as documented in <manref
-         name="update-mime" section="8">. They should <em>not</em> depend
-         on, recommend, or suggest <prgn>mime-support</prgn>. Instead,
-         they should just put something like the following in the
-         <tt>postinst</tt> and <tt>postrm</tt> scripts:
-
-         <example>
-  if [ -x /usr/sbin/update-mime ]; then
-      update-mime
-  fi
-         </example>
+         <prgn>update-mime</prgn> program, which integrates these
+         registrations in the <file>/etc/mailcap</file> file, using Dpkg
+         triggers<footnote>
+           Creating, modifying or removing a file in
+           <file>/usr/lib/mime/packages/</file> using maintainer scripts will
+           not activate the trigger.  In that case, it can be done by calling
+           <tt>dpkg-trigger --no-await --by-package=&lt;me&gt; /usr/lib/mime/packages</tt>,
+           where <tt>&lt;me&gt;</tt> is the name of the package.
+         </footnote>.
+         Packages using this facility <em>should not</em> depend on,
+         recommend, or suggest <prgn>mime-support</prgn>.
        </p>
-
       </sect>
 
       <sect>