On Wed, Sep 01, 2021 at 11:01:01AM +0200, Florian Weimer wrote:
* Dan Čermák:
> it has been recently proposed to switch openSUSE to run ldconfig via a
> %transfiletriggerin/-un scriptlet instead of manually in %post & %postun
> the same way as Fedora does it at the moment.
>
> However, an interesting issue has been raised: what happens if package A
> gets upgraded in the same transaction as package B, but B needs A during
> the upgrade. A will install a new shared library, but ldconfig will run
> after B has already tried to upgrade.
Fedora ships the soname links in the package, addressing this issue.
For example, openssl-libs contains:
/usr/lib64/libcrypto.so.1.1
/usr/lib64/libcrypto.so.1.1.1k
/usr/lib64/libssl.so.1.1
/usr/lib64/libssl.so.1.1.1k
As a result, running ldconfig is purely an optimization.
There are some packages that install fails into /etc/ld.so.conf.d, and
such packages still have to run ldconfig explicitly. (We should perhaps
move those shared objects to /usr/lib64, too.)
Did anyone measure if ldconfig caching is actually useful on
modern machines?
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org