build_library/toolchain_util: Set up symlink for user patches

This was a place I missed where /etc/portage is set up. Because of it,
user patches for sys-devel/gcc were not picked up.

Also stop using deprecated PORTDIR and PORTDIR_OVERLAY getters. We
still set those variables, but we will drop them eventually.
This commit is contained in:
Krzesimir Nowak 2023-01-26 08:47:20 +01:00
parent e5b8570062
commit 57f849239f

View File

@ -284,9 +284,16 @@ _configure_sysroot() {
$sudo cp /etc/portage/repos.conf/* "${ROOT}/etc/portage/repos.conf/" $sudo cp /etc/portage/repos.conf/* "${ROOT}/etc/portage/repos.conf/"
$sudo eselect profile set --force "$profile" $sudo eselect profile set --force "$profile"
$sudo tee "${ROOT}/etc/portage/make.conf" >/dev/null <<EOF local coreos_path
$(portageq envvar -v CHOST CBUILD ROOT \ coreos_path=$(portageq get_repo_path "${ROOT}" coreos)
PORTDIR PORTDIR_OVERLAY DISTDIR PKGDIR) $sudo ln -sfT "${coreos_path}/coreos/user-patches" "${ROOT}/etc/portage/patches"
echo "Writing make.conf for the sysroot ${SYSROOT}, root ${ROOT}"
$sudo tee "${ROOT}/etc/portage/make.conf" <<EOF
$(portageq envvar -v CHOST CBUILD ROOT DISTDIR PKGDIR)
# TODO: These are deprecated, drop them eventually.
PORTDIR="$(portageq get_repo_path "${ROOT}" portage-stable)"
PORTDIR_OVERLAY="${coreos_path} $(portageq get_repo_path "${ROOT}" x-crossdev)"
HOSTCC=\${CBUILD}-gcc HOSTCC=\${CBUILD}-gcc
PKG_CONFIG_PATH="\${SYSROOT}/usr/lib/pkgconfig/" PKG_CONFIG_PATH="\${SYSROOT}/usr/lib/pkgconfig/"
# Enable provenance reporting by default. Produced files are in /usr/share/SLSA # Enable provenance reporting by default. Produced files are in /usr/share/SLSA