Copy package into chroot environment on Gentoo
I would like to share simple bash one line script for copying or updating a package installed on your main Gentoo system to an existent chroot environment. Basically this script takes full list of package files with help of “equery files” command and than copies all these files into chroot environment.
# for f in `equery files bzip2`; do if [ -d "$f" ]; then if [ ! -e "/your/chroot/directory$f" ]; then mkdir "/your/chroot/directory$f"; fi; else cp "$f" "/your/chroot/directory$f"; fi; done