update_chroot: remove dependence on /usr/local/portage/* symlinks

A step in reducing the amount of initialization code required: drop
needless symlinks under /usr/local/portage to the portage trees. Just
configure portage to point directly at the source instead. Only crossdev
remains in that location because it is a locally managed overlay.
This commit is contained in:
Michael Marineau 2015-07-05 15:29:21 -07:00
parent 76856e8718
commit 174a847e36
3 changed files with 4 additions and 11 deletions

View File

@ -146,14 +146,6 @@ init_users () {
init_setup () {
info "Running init_setup()..."
mkdir -p -m 755 "${FLAGS_chroot}/usr" \
"${FLAGS_chroot}/usr/local/portage" \
"${FLAGS_chroot}"/"${CROSSDEV_OVERLAY}"
ln -sf "${CHROOT_TRUNK_DIR}/src/third_party/coreos-overlay" \
"${FLAGS_chroot}"/"${CHROOT_OVERLAY}"
ln -sf "${CHROOT_TRUNK_DIR}/src/third_party/portage-stable" \
"${FLAGS_chroot}"/"${PORTAGE_STABLE_OVERLAY}"
# Set up sudoers. Inside the chroot, the user can sudo without a password.
# (Safe enough, since the only way into the chroot is to 'sudo chroot', so
# the user's already typed in one sudo password...)

View File

@ -168,7 +168,8 @@ case "$BOARD" in
;;
esac
# Locations we will need
COREOS_CONFIG="/usr/local/portage/coreos/coreos/config"
COREOS_OVERLAY="${REPO_ROOT}/src/third_party/coreos-overlay"
COREOS_CONFIG="${COREOS_OVERLAY}/coreos/config"
BOARD_ROOT="/build/${BOARD_VARIANT}"
BOARD_ETC="${BOARD_ROOT}/etc"
BOARD_ARCH=$(get_board_arch "$BOARD")

View File

@ -45,9 +45,9 @@ switch_to_strict_mode
. "${BUILD_LIBRARY_DIR}/toolchain_util.sh"
PORTAGE_STABLE_OVERLAY="/usr/local/portage/stable"
PORTAGE_STABLE_OVERLAY="${REPO_ROOT}/src/third_party/portage-stable"
CROSSDEV_OVERLAY="/usr/local/portage/crossdev"
COREOS_OVERLAY="/usr/local/portage/coreos"
COREOS_OVERLAY="${REPO_ROOT}/src/third_party/coreos-overlay"
COREOS_CONFIG="${COREOS_OVERLAY}/coreos/config"
info "Setting up portage..."