From 174a847e362f8a1d05210750eafb6ccb4735f59c Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Sun, 5 Jul 2015 15:29:21 -0700 Subject: [PATCH] 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. --- sdk_lib/make_chroot.sh | 8 -------- setup_board | 3 ++- update_chroot | 4 ++-- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/sdk_lib/make_chroot.sh b/sdk_lib/make_chroot.sh index 5057aedfd2..9773349425 100755 --- a/sdk_lib/make_chroot.sh +++ b/sdk_lib/make_chroot.sh @@ -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...) diff --git a/setup_board b/setup_board index 4f65ddfc38..5f948fbe84 100755 --- a/setup_board +++ b/setup_board @@ -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") diff --git a/update_chroot b/update_chroot index 2d5c474db9..89abd6eb94 100755 --- a/update_chroot +++ b/update_chroot @@ -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..."