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

PW#6-1: ldconfig calls in postinst scripts



[This mail is part of Debian Policy Weekly issue #6]

Topic 1: ldconfig calls in postinst scripts

STATE: APPROVAL
REF:   cf. bug #20515

Current policy states that in general, calling `ldconfig' from the postinst
script is not necessary. There have been a few discussions on this topic
already, with the result that current policy is wrong: it *is* necessary to
run `ldconfig' in postinst scripts if the package installs a shared library
(into a directory which is listed in /etc/ld.so.conf).

Therefore, I suggest to change the Packaging Manual (last paragraph of the
preface of chapter 12) to state the following:

     Any package installing shared libraries in a directory that's
     listed in /etc/ld.so.conf must call `ldconfig' in its postinst
     script if and only if the first argument is `configure'.

     It is especially important not to call ldconfig in the postrm or
     preinst scripts in the case where the package is being upgraded
     (see Details of unpack phase of installation or upgrade, section
     6.3), 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!

----------------------------------------------------------------------------


--
To UNSUBSCRIBE, email to debian-policy-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: