From d3d088a61d3601b673bfd63c488d874681b1f356 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 26 Oct 2008 04:16:41 +0100 Subject: [PATCH] chroot: rebuild dynamic linker's cache also when entering chroot. --HG-- extra : convert_revision : 969f3714f7f90c3805d8c8bcf891513608e2744d --- helper-templates/chroot.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/helper-templates/chroot.sh b/helper-templates/chroot.sh index f8aaef06f2f..e46c44e9200 100644 --- a/helper-templates/chroot.sh +++ b/helper-templates/chroot.sh @@ -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..."