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

mandate ldconfig -X?



I propose that instead of calling "ldconfig", maintainer scripts of
packages containing shared libraries should call "ldconfig -X".

Background:
ldconfig has two purposes:
1. For each shared library, create/update a symbolic link from the
   library's soname to the library file. The link is only changed if
   it was broken/non-existing before, or the library in question has a
   higher version than the current destination of the link.
2. Update the locations of shared libraries in /etc/ld.so.cache
Per default, ldconfig will execute both actions.

Rationale:
On a Debian system, the first point is moot, because library packages
will include the appropriate symlink already as per policy.

The second action is generally useful. "ldconfig -X" will do just
that, and omit the first.

Why should we not commit the first action anyway?

For one, it is unnecessary, and wastes time. But more importantly, the
Hurd has no ld.so.cache, which kills reason 2 on this platform. Debian
GNU/Hurd systems also don't have reason 1, so there is currently no real
ldconfig program on the Hurd. Rather than writing a program that's
completely pointless, I'd rather we called ldconfig correcly, i.e.
with the -X parameter. "ldconfig -X" will just do nothing on the Hurd.

Comments appreciated. If no flaws are found in my logic, I'll submit a
proposal.

-- 
Robbe

Attachment: signature.ng
Description: PGP signature


Reply to: