diff options
author | Zac Medico <zmedico@gentoo.org> | 2022-02-18 11:28:10 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2022-02-18 11:28:54 -0800 |
commit | a364ffdb5c55c315e140fec2c7f1014e8d23e007 (patch) | |
tree | 1831284dba2ea0f4c98c2e9b320f709314db5fea /sys-apps/portage | |
parent | app-metrics/redis_exporter: Remove old versions (diff) | |
download | gentoo-a364ffdb5c55c315e140fec2c7f1014e8d23e007.tar.gz gentoo-a364ffdb5c55c315e140fec2c7f1014e8d23e007.tar.bz2 gentoo-a364ffdb5c55c315e140fec2c7f1014e8d23e007.zip |
sys-apps/portage: skip compat upgrade for USE=build
Bug: https://bugs.gentoo.org/833582
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'sys-apps/portage')
-rw-r--r-- | sys-apps/portage/portage-3.0.30-r1.ebuild | 38 | ||||
-rw-r--r-- | sys-apps/portage/portage-9999.ebuild | 38 |
2 files changed, 40 insertions, 36 deletions
diff --git a/sys-apps/portage/portage-3.0.30-r1.ebuild b/sys-apps/portage/portage-3.0.30-r1.ebuild index 128c6819b0d9..590e0036a88a 100644 --- a/sys-apps/portage/portage-3.0.30-r1.ebuild +++ b/sys-apps/portage/portage-3.0.30-r1.ebuild @@ -228,24 +228,26 @@ python_install_all() { } pkg_preinst() { - python_setup - local sitedir=$(python_get_sitedir) - [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory" - env -u DISTDIR \ - -u PORTAGE_OVERRIDE_EPREFIX \ - -u PORTAGE_REPOSITORIES \ - -u PORTDIR \ - -u PORTDIR_OVERLAY \ - PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ - "${PYTHON}" -m portage._compat_upgrade.default_locations || die - - env -u BINPKG_COMPRESS -u PORTAGE_REPOSITORIES \ - PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ - "${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die - - env -u FEATURES -u PORTAGE_REPOSITORIES \ - PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ - "${PYTHON}" -m portage._compat_upgrade.binpkg_multi_instance || die + if ! use build; then + python_setup + local sitedir=$(python_get_sitedir) + [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory" + env -u DISTDIR \ + -u PORTAGE_OVERRIDE_EPREFIX \ + -u PORTAGE_REPOSITORIES \ + -u PORTDIR \ + -u PORTDIR_OVERLAY \ + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ + "${PYTHON}" -m portage._compat_upgrade.default_locations || die + + env -u BINPKG_COMPRESS -u PORTAGE_REPOSITORIES \ + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ + "${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die + + env -u FEATURES -u PORTAGE_REPOSITORIES \ + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ + "${PYTHON}" -m portage._compat_upgrade.binpkg_multi_instance || die + fi # elog dir must exist to avoid logrotate error for bug #415911. # This code runs in preinst in order to bypass the mapping of diff --git a/sys-apps/portage/portage-9999.ebuild b/sys-apps/portage/portage-9999.ebuild index 6db78dd658f7..c741638d18e9 100644 --- a/sys-apps/portage/portage-9999.ebuild +++ b/sys-apps/portage/portage-9999.ebuild @@ -222,24 +222,26 @@ python_install_all() { } pkg_preinst() { - python_setup - local sitedir=$(python_get_sitedir) - [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory" - env -u DISTDIR \ - -u PORTAGE_OVERRIDE_EPREFIX \ - -u PORTAGE_REPOSITORIES \ - -u PORTDIR \ - -u PORTDIR_OVERLAY \ - PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ - "${PYTHON}" -m portage._compat_upgrade.default_locations || die - - env -u BINPKG_COMPRESS -u PORTAGE_REPOSITORIES \ - PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ - "${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die - - env -u FEATURES -u PORTAGE_REPOSITORIES \ - PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ - "${PYTHON}" -m portage._compat_upgrade.binpkg_multi_instance || die + if ! use build; then + python_setup + local sitedir=$(python_get_sitedir) + [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory" + env -u DISTDIR \ + -u PORTAGE_OVERRIDE_EPREFIX \ + -u PORTAGE_REPOSITORIES \ + -u PORTDIR \ + -u PORTDIR_OVERLAY \ + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ + "${PYTHON}" -m portage._compat_upgrade.default_locations || die + + env -u BINPKG_COMPRESS -u PORTAGE_REPOSITORIES \ + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ + "${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die + + env -u FEATURES -u PORTAGE_REPOSITORIES \ + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ + "${PYTHON}" -m portage._compat_upgrade.binpkg_multi_instance || die + fi # elog dir must exist to avoid logrotate error for bug #415911. # This code runs in preinst in order to bypass the mapping of |