mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-28 22:12:10 +01:00
build_library/toolchain_util: Fix setting a profile
Setting a profile in a newly created sysroot when building native toolchains broke after an eselect update. Apparently eselect gets the path to the coreos-overlay repository and then prefixes it with ROOT. Since ROOT was set to /build/<arch>-usr, the resulting patch was wrong. Fix this by telling eselect where to find our make.profile symlink in new sysroot by setting PORTAGE_CONFIGROOT to /build/<arch>-usr and where to find our profiles by setting ROOT (and SYSROOT, because it must match ROOT) to /.
This commit is contained in:
parent
2c15410552
commit
b1220b6e4e
@ -284,7 +284,11 @@ _configure_sysroot() {
|
||||
|
||||
"${sudo[@]}" mkdir -p "${ROOT}/etc/portage/"{profile,repos.conf}
|
||||
"${sudo[@]}" cp /etc/portage/repos.conf/* "${ROOT}/etc/portage/repos.conf/"
|
||||
"${sudo[@]}" eselect profile set --force "$profile"
|
||||
# set PORTAGE_CONFIGROOT to tell eselect to modify the profile
|
||||
# inside /build/<arch>-usr, but set ROOT to /, so eselect will
|
||||
# actually find the profile which is outside /build/<arch>-usr,
|
||||
# set SYSROOT to / as well, because it must match ROOT
|
||||
"${sudo[@]}" PORTAGE_CONFIGROOT=${ROOT} SYSROOT=/ ROOT=/ eselect profile set --force "$profile"
|
||||
|
||||
local coreos_path
|
||||
coreos_path=$(portageq get_repo_path "${ROOT}" coreos-overlay)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user