From c726594cfd5326e6282a322098be5d3660cb9d11 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Tue, 15 Aug 2023 22:40:04 +0100 Subject: sys-apps/portage: Don't run _compat_upgrade when ROOT!=/ Even if you point to the right config directory with PORTAGE_CONFIGROOT, these still load the default config files from /usr/share/portage rather than ${ROOT}/usr/share/portage and therefore do the wrong thing. portage._compat_upgrade.default_locations also cannot tell what ROOT's directories will look like later, so we should not take action based on these. Signed-off-by: James Le Cuirot --- sys-apps/portage/portage-3.0.50.ebuild | 2 +- sys-apps/portage/portage-9999.ebuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys-apps/portage/portage-3.0.50.ebuild b/sys-apps/portage/portage-3.0.50.ebuild index 91d945df8187..08cbf145abb2 100644 --- a/sys-apps/portage/portage-3.0.50.ebuild +++ b/sys-apps/portage/portage-3.0.50.ebuild @@ -177,7 +177,7 @@ src_test() { } pkg_preinst() { - if ! use build; then + if ! use build && [[ -z ${ROOT} ]]; then python_setup local sitedir=$(python_get_sitedir) [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory" diff --git a/sys-apps/portage/portage-9999.ebuild b/sys-apps/portage/portage-9999.ebuild index 91d945df8187..08cbf145abb2 100644 --- a/sys-apps/portage/portage-9999.ebuild +++ b/sys-apps/portage/portage-9999.ebuild @@ -177,7 +177,7 @@ src_test() { } pkg_preinst() { - if ! use build; then + if ! use build && [[ -z ${ROOT} ]]; then python_setup local sitedir=$(python_get_sitedir) [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory" -- cgit v1.2.3-65-gdbad