build: setup_stage needs to know about chroot, so...

... refactor chroot foo into setup_chroot.  Everybody is happy, right?
This commit is contained in:
Franco Fichtner 2014-12-20 22:34:42 +01:00
parent 3971334486
commit 3050fa5a57
2 changed files with 10 additions and 6 deletions

View File

@ -102,6 +102,15 @@ git_describe()
export REPO_COMMENT=${COMMENT}
}
setup_chroot()
{
echo ">>> Setting up chroot in ${1}"
cp /etc/resolv.conf ${1}/etc
mount -t devfs devfs ${1}/dev
chroot ${1} /etc/rc.d/ldconfig start
}
setup_base()
{
echo ">>> Setting up world in ${1}"

View File

@ -35,12 +35,7 @@ git_clear ${PORTSDIR}
setup_stage ${STAGEDIR}
setup_base ${STAGEDIR}
echo ">>> Setting up chroot in ${STAGEDIR}"
cp /etc/resolv.conf ${STAGEDIR}/etc
mount -t devfs devfs ${STAGEDIR}/dev
chroot ${STAGEDIR} /etc/rc.d/ldconfig start
setup_chroot ${STAGEDIR}
echo ">>> Setting up ports in ${STAGEDIR}"