Bug#89674: [PROPOSAL] Clarify ldconfig usage
Package: debian-policy
Version: 3.5.2.0
Severity: wishlist
Proposed patch:
Any package installing shared libraries in a directory that's listed
in `/etc/ld.so.conf' or in one of the default library directories of
`ld.so' (currently, these are `/usr/lib' and `/lib') must call
`ldconfig' in its `postinst' script if and only if the first argument
- is `configure'. However, it is important not to call `ldconfig' in
+ is `configure', and should call `ldconfig' in its `postrm' if and
+ only if the first argument is `remove'. Packages must not call
+ `ldconfig' in
the postrm or preinst scripts in the case where the package is being
upgraded (see Section 6.5, `Details of unpack phase of installation or
upgrade'), as `ldconfig' will see the temporary names that `dpkg' uses
for the files while it is installing them and will make the shared
library links point to them, just before `dpkg' continues the
installation and removes the links!
This clarifies how ldconfig should/must be used.
Julian
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Julian Gilbey, Dept of Maths, Queen Mary, Univ. of London
Debian GNU/Linux Developer, see http://people.debian.org/~jdg
Donate free food to the world's hungry: see http://www.thehungersite.com/
Reply to: