summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2023-08-15 22:40:04 +0100
committerJames Le Cuirot <chewi@gentoo.org>2023-08-15 22:40:04 +0100
commitc726594cfd5326e6282a322098be5d3660cb9d11 (patch)
tree13582a439111027b041093ede9c841c1886b1ddb
parentapp-admin/salt: add 3005.2 (diff)
downloadgentoo-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.ebuild2
-rw-r--r--sys-apps/portage/portage-9999.ebuild2
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"