From: Charles Plessy Date: Thu, 1 Mar 2012 13:58:41 +0000 (+0900) Subject: Rely on triggers instead of calling update-mime X-Git-Url: https://git.donarmstrong.com/?p=debian%2Fdebian-policy.git;a=commitdiff_plain;h=73edbbc37d79bb9c3c6069c957c2bf7500fc1926 Rely on triggers instead of calling update-mime 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". --- diff --git a/policy.sgml b/policy.sgml index 4392653..9479fc9 100644 --- a/policy.sgml +++ b/policy.sgml @@ -8038,33 +8038,27 @@ Reloading description configuration...done.

- 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 + format (RFC 1524) in the directory + /usr/lib/mime/packages/. The file name should be the + binary package's name.

The mime-support package provides the - update-mime program which allows packages to - register programs that can show, compose, edit or print - MIME types. -

- -

- Packages containing such programs must register them - with update-mime as documented in . They should not depend - on, recommend, or suggest mime-support. Instead, - they should just put something like the following in the - postinst and postrm scripts: - - - if [ -x /usr/sbin/update-mime ]; then - update-mime - fi - + update-mime program, which integrates these + registrations in the /etc/mailcap file, using Dpkg + triggers + Creating, modifying or removing a file in + /usr/lib/mime/packages/ using maintainer scripts will + not activate the trigger. In that case, it can be done by calling + dpkg-trigger --no-await --by-package=<me> /usr/lib/mime/packages, + where <me> is the name of the package. + . + Packages using this facility should not depend on, + recommend, or suggest mime-support.

-