"installpkg --root " and "ldconfig -r"
by tfonz from LinuxQuestions.org on (#5J522)
installpkg contains this comment:
Code: # It's a good idea to make sure those newly installed libraries are properly
# activated for use, unless ROOT is pointing somewhere else in which case
# running ldconfig on the host system won't make any difference:followed by:
Code: if [ "$ROOT" = "" ] && [ -x /sbin/ldconfig ]; then
( flock 9 || exit 11
/sbin/ldconfig 2> /dev/null
) 9> $INSTLOCKDIR/ldconfig.lock
fiI don't know since when, but ldconfig supports -r. From the man-page:
Code: -r root
Change to and use root as the root directory.So it seems, installpkg --root could use ldconfig -r, like this (replacing the above if):
Code: if [ -x /sbin/ldconfig ]; then
( flock 9 || exit 11
/sbin/ldconfig -r "$ROOT/" 2> /dev/null
) 9> $INSTLOCKDIR/ldconfig.lock
fiNote that this is intentionally using "/sbin/ldconfig" and not "$ROOT/sbin/ldconfig". So it'll work already for the initial packages, no matter in which order you install them, or if you skip glibc-solibs. And installpkg relies on host tools (tar, etc) anyway.


Code: # It's a good idea to make sure those newly installed libraries are properly
# activated for use, unless ROOT is pointing somewhere else in which case
# running ldconfig on the host system won't make any difference:followed by:
Code: if [ "$ROOT" = "" ] && [ -x /sbin/ldconfig ]; then
( flock 9 || exit 11
/sbin/ldconfig 2> /dev/null
) 9> $INSTLOCKDIR/ldconfig.lock
fiI don't know since when, but ldconfig supports -r. From the man-page:
Code: -r root
Change to and use root as the root directory.So it seems, installpkg --root could use ldconfig -r, like this (replacing the above if):
Code: if [ -x /sbin/ldconfig ]; then
( flock 9 || exit 11
/sbin/ldconfig -r "$ROOT/" 2> /dev/null
) 9> $INSTLOCKDIR/ldconfig.lock
fiNote that this is intentionally using "/sbin/ldconfig" and not "$ROOT/sbin/ldconfig". So it'll work already for the initial packages, no matter in which order you install them, or if you skip glibc-solibs. And installpkg relies on host tools (tar, etc) anyway.