On Tue, Feb 13, 2001 at 09:56:08AM -0800, Joey Hess wrote: > I belive it needs to be called in the postrm in the remove case, so > ldconfig gets told libraries no longer exist. At least debhelper does > so. > > The packaging manual seems clear to me. It says you must not call > ldconfig in postrm/preinst scripts during upgrades, because it interacts > badly with dpkg in those cases due to temporary file names used by dpkg > when it is in the middle of upgrading a package.
So maybe the following wording would be better? 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'. It must also call `ldconfig' in its 'postrm' script + to remove the library information from the database. However, it is + important not to 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! 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/