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

Bug#111025: debian-policy: typo in chapter 9: ldconfig and pre/post scripts



On Sat, Sep 08, 2001 at 06:55:56PM -0400, Steve M. Robbins wrote:
> I am proposing the following patch to policy.  The difference from my
> previous proposal is to allow calling "ldconfig" in the "postinst" no
> matter what the arguments are.  Detailed rationale follows, below.
> 
> --- policy.sgml.orig	Sat Sep  8 16:12:53 2001
> +++ policy.sgml	Sat Sep  8 17:06:01 2001
> @@ -3711,21 +3711,16 @@
>  	    </list>
>  	  </p>
>  	</footnote>
> -	must call <prgn>ldconfig</prgn> in its <prgn>postinst</prgn>
> -	script if the first argument is <tt>configure</tt> and should
> -	call it in the <prgn>postrm</prgn> script if the first
> -	argument is <tt>remove</tt>.
> -      </p>
> -
> -      <p>
> -	However, <prgn>postrm</prgn> and <prgn>preinst</prgn> scripts
> -	<em>must not</em> call <prgn>ldconfig</prgn> in the case where
> -	the package is being upgraded (see <ref id="unpackphase"> for
> -	details), as <prgn>ldconfig</prgn> will see the temporary
> -	names that <prgn>dpkg</prgn> uses for the files while it is
> -	installing them and will make the shared library links point
> -	to them, just before <prgn>dpkg</prgn> continues the
> -	installation and renames the temporary files!
> +	must use <prgn>ldconfig</prgn> to update the shared library
> +	system.  The package must call <prgn>ldconfig</prgn> in the
> +	<prgn>postinst</prgn> script if the first argument is
> +	<tt>configure</tt>; the <prgn>postinst</prgn> script may
> +	optionally invoke <prgn>ldconfig</prgn> at other times.  The
> +	package should call <prgn>ldconfig</prgn> in the
> +	<prgn>postrm</prgn> script if the first argument is
> +	<tt>remove</tt>.  The maintainer scripts must not invoke
> +	<prgn>ldconfig</prgn> under any circumstances other than those
> +	described in this paragraph.
>        </p>

I second this proposal in this version.

> 	postrm
> 	------
> 
> An installed shared lib has been removed from the system just before
> "postrm remove" is run.  This is the proper time to call "ldconfig"
> to notify the system of that fact.  Current policy has this as a
> SHOULD requirement.  I still haven't found out why it is not MUST.

I wonder whether it's because the installed library won't be found if
the postinst ldconfig is not run, but an extra dangling symlink or
similar following a remove is not such a problem.

   Julian

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

         Julian Gilbey, Dept of Maths, Queen Mary, Univ. of London
       Debian GNU/Linux Developer,  see http://people.debian.org/~jdg
          NEW: Visit http://www.helpthehungry.org/ to do just that

Attachment: pgpt_dE4f6GSp.pgp
Description: PGP signature


Reply to: