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

Re: when to call ldconfig



Julian Gilbey wrote:
> On Thu, Oct 05, 2000 at 01:15:00PM -0700, Sean 'Shaleh' Perry wrote:
> > packaging manual is a little unclear.  When do I call ldconfig?  It is clear
> > that I should call it only for the configure case in my postinst script.  But
> > do I call it at all in my pre/postrm scripts?  The manual simply says to be
> > sure not to call it for the upgrade case.
> 
> So should it be called in the pre/postrm scripts in a remove/purge
> scenario?  Any experts out there?

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 for the remainder of the cases, the cases where dpkg is not in the
middle of upgrading a package, and no temporary filenames are around,
you can call ldconfig pretty much whenever you want. Of course some
cases seem pretty silly to call it in (like a preinst on initial
install), but I'm sure someone will find a reason..

-- 
see shy jo



Reply to: