Re: problem with ldconfig and packaging libs
"Ionutz" == Ionutz Borcoman <email@example.com> writes:
> Ben Collins wrote:
>> Sounds to me like you just need to run ldconfig as root one time
>> to update your ld.so.cache file. It should resolve your problem the
>> Right Way.
> I have a posinst that says:
> set -e
> Isn't this enough ? Installing the package and a program that
> depends on it worked OK so I have presumed that I have solved the
> problem. As you can install deb files only as root, the ldconfig is
> run at installation time as root. No need to run it at deb creation
> time. Am I missing something ?
No, you just need to be careful and to read the Packaging Manual,
where it says:
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 the
postrm or preinst scripts in the case where the package is being
upgraded (see section 6.3, `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!
You are running ldconfig at all times, which is downright incorrect.
.....Adam Di Carlo....adam@onShore.com.....<URL:http://www.onShore.com/>