On Monday, September 10, 2012 18:38:57 Cristian Rodríguez wrote:
El 10/09/12 18:08, Dimstar / Dominique Leuenberger escribió:
You need to move the ldconfig call to the libhttrack2 sub package:
%post -n libhttrack2 -p /sbin/ldconfig %postun -n libhttrack2 -p /sbin/ldconfig
%post without -n <name> implies having the post on the main package; which in your case does not need it, as the lib lives in a sub - package.
That being said, I wonder why we still need this in the first place, will it be possible to teach the linker to "keep an eye" on libraries already in the cache with inotify and rebuild it automagically when needed ?
You don't need it - the dynamic linker ld.so, e.g. on x86-64 it is /lib64/ld-linux-x86-64.so.2, will first check the cache and then check the filesystem.
Invoking ldconfig from ld.so would be really bad - and implementing ldconfig as a daemon is also not worth it.
Still, library searching is costly and thus we require the ldconfig as an optimiziation.
Btw. if you want to see how libraries are searched run for example: LD_DEBUG=libs /bin/ls
Need help? LD_DEBUG=help /bin/ls