From 9439203f49e825a1de435dd311c5d9a26b72728f Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Mar 2025 16:24:31 +0100 Subject: [PATCH] setup_board: Fix setting a profile Same fix as done in build_library/toolchain_util.sh. --- setup_board | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup_board b/setup_board index 83f784f018..7073f2d037 100755 --- a/setup_board +++ b/setup_board @@ -236,7 +236,13 @@ sudo mkdir -p "${BOARD_ETC}/portage/"{profile,repos.conf} sudo ln -sfT "$(portageq get_repo_path / coreos-overlay)/coreos/user-patches" \ "${BOARD_ETC}/portage/patches" sudo cp /etc/portage/repos.conf/* "${BOARD_ETC}"/portage/repos.conf/ -sudo ROOT="${BOARD_ROOT}" eselect profile set --force "${PORTAGE_PROFILE}" +# set PORTAGE_CONFIGROOT to tell eselect to modify the profile inside +# /build/-usr, but set ROOT to /, so eselect will actually find +# the profile which is outside /build/-usr, set SYSROOT to / as +# well, because it must match ROOT +sudo \ + PORTAGE_CONFIGROOT="${BOARD_ROOT}" ROOT=/ SYSROOT=/ \ + eselect profile set --force "${PORTAGE_PROFILE}" # Cleanup/migrate from older make.conf files sudo rm -f "${BOARD_ETC}/make.conf" "${BOARD_ETC}/make.conf.common"