chroot: rebuild dynamic linker's cache also when entering chroot.

--HG--
extra : convert_revision : 969f3714f7f90c3805d8c8bcf891513608e2744d
This commit is contained in:
Juan RP 2008-10-26 04:16:41 +01:00
parent 9447f6f738
commit d3d088a61d

View file

@ -64,17 +64,21 @@ if [ -n "$XBPS_MAKEJOBS" ]; then
echo "XBPS_MAKEJOBS=$XBPS_MAKEJOBS" >> $XBPS_MASTERDIR/etc/xbps.conf
fi
rebuild_ldso_cache()
{
echo -n "==> Rebuilding chroot's dynamic linker cache..."
chroot $XBPS_MASTERDIR /sbin/ldconfig -c /etc/ld.so.conf
chroot $XBPS_MASTERDIR /sbin/ldconfig -C /etc/ld.so.cache
echo " done."
}
install_chroot_pkg()
{
local pkg="$1"
[ -z "$pkg" ] && return 1
echo -n "==> Rebuilding chroot's dynamic linker cache..."
chroot $XBPS_MASTERDIR /sbin/ldconfig -c /etc/ld.so.conf
chroot $XBPS_MASTERDIR /sbin/ldconfig -C /etc/ld.so.cache
echo " done."
rebuild_ldso_cache
chroot $XBPS_MASTERDIR /xbps/xbps.sh install $pkg
umount_chroot_fs
echo "==> Exiting from the chroot on $XBPS_MASTERDIR..."
@ -82,6 +86,7 @@ install_chroot_pkg()
enter_chroot()
{
rebuild_ldso_cache
chroot $XBPS_MASTERDIR /bin/bash
umount_chroot_fs
echo "==> Exiting from the chroot on $XBPS_MASTERDIR..."