[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#661816: debian-policy: Do not call update-mime directly, since it is triggered by Dpkg.



On Thu, 2012-08-16 at 08:34:39 +0900, Charles Plessy wrote:
> >From b8c0097790951831202cbd28df8be8bbf223e272 Mon Sep 17 00:00:00 2001
> From: Charles Plessy <plessy@debian.org>
> Date: Thu, 1 Mar 2012 22:58:41 +0900
> Subject: [PATCH] Do not call update-mime directly, since it is triggered by
>  Dpkg.
> 
> 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 |   38 ++++++++++++++++----------------------
>  1 file changed, 16 insertions(+), 22 deletions(-)
> 
> diff --git a/policy.sgml b/policy.sgml
> index 003675c..d209ce5 100644
> --- a/policy.sgml
> +++ b/policy.sgml
> @@ -7515,33 +7515,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

Dpkg → 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.

There's really no need to use --by-package from maintainer scripts,
dpkg itself will set the appropriate environment variables.

> +	  </footnote>.
> +	  Packages using this facility <em>should not</em> depend on,
> +	  recommend, or suggest <prgn>mime-support</prgn>.
>  	</p>
> -

Otherwise, seconded.

thanks,
guillem

Attachment: signature.asc
Description: Digital signature


Reply to: