Skip to content

Commit 9439203

Browse files
committed
setup_board: Fix setting a profile
Same fix as done in build_library/toolchain_util.sh.
1 parent 39825d5 commit 9439203

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

setup_board

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,13 @@ sudo mkdir -p "${BOARD_ETC}/portage/"{profile,repos.conf}
236236
sudo ln -sfT "$(portageq get_repo_path / coreos-overlay)/coreos/user-patches" \
237237
"${BOARD_ETC}/portage/patches"
238238
sudo cp /etc/portage/repos.conf/* "${BOARD_ETC}"/portage/repos.conf/
239-
sudo ROOT="${BOARD_ROOT}" eselect profile set --force "${PORTAGE_PROFILE}"
239+
# set PORTAGE_CONFIGROOT to tell eselect to modify the profile inside
240+
# /build/<arch>-usr, but set ROOT to /, so eselect will actually find
241+
# the profile which is outside /build/<arch>-usr, set SYSROOT to / as
242+
# well, because it must match ROOT
243+
sudo \
244+
PORTAGE_CONFIGROOT="${BOARD_ROOT}" ROOT=/ SYSROOT=/ \
245+
eselect profile set --force "${PORTAGE_PROFILE}"
240246

241247
# Cleanup/migrate from older make.conf files
242248
sudo rm -f "${BOARD_ETC}/make.conf" "${BOARD_ETC}/make.conf.common"

0 commit comments

Comments
 (0)