diff options
author | James Le Cuirot <chewi@gentoo.org> | 2023-08-15 22:40:04 +0100 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2023-08-15 22:40:04 +0100 |
commit | c726594cfd5326e6282a322098be5d3660cb9d11 (patch) | |
tree | 13582a439111027b041093ede9c841c1886b1ddb | |
parent | app-admin/salt: add 3005.2 (diff) | |
download | gentoo-c726594cfd5326e6282a322098be5d3660cb9d11.tar.gz gentoo-c726594cfd5326e6282a322098be5d3660cb9d11.tar.bz2 gentoo-c726594cfd5326e6282a322098be5d3660cb9d11.zip |
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 <chewi@gentoo.org>
-rw-r--r-- | sys-apps/portage/portage-3.0.50.ebuild | 2 | ||||
-rw-r--r-- | 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" |