sys-apps/portage: update 9999 with backward compat for bug 378603
authorZac Medico <zmedico@gentoo.org>
Fri, 19 Apr 2019 04:49:57 +0000 (21:49 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 19 Apr 2019 04:50:19 +0000 (21:50 -0700)
Bug: https://bugs.gentoo.org/378603
Package-Manager: Portage-2.3.64, Repoman-2.3.12
Signed-off-by: Zac Medico <zmedico@gentoo.org>
sys-apps/portage/portage-9999.ebuild

index 42273cc4fdd399781b78d8b14973a5d628dfd153..5ac144404c9ad4e19dfe2c9e18a9546604c7d239 100644 (file)
@@ -247,16 +247,15 @@ python_install_all() {
 }
 
 pkg_preinst() {
-       # comment out sanity test until it is fixed to work
-       # with the new PORTAGE_PYM_PATH
-       #if [[ $ROOT == / ]] ; then
-               ## Run some minimal tests as a sanity check.
-               #local test_runner=$(find "${ED}" -name runTests)
-               #if [[ -n $test_runner && -x $test_runner ]] ; then
-                       #einfo "Running preinst sanity tests..."
-                       #"$test_runner" || die "preinst sanity tests failed"
-               #fi
-       #fi
+       python_setup
+       python_export PYTHON_SITEDIR
+       env -u DISTDIR \
+               -u PORTAGE_OVERRIDE_EPREFIX \
+               -u PORTAGE_REPOSITORIES \
+               -u PORTDIR \
+               -u PORTDIR_OVERLAY \
+               PYTHONPATH="${ED%/}${PYTHON_SITEDIR}${PYTHONPATH:+:${PYTHONPATH}}" \
+               "${PYTHON}" -m portage._compat_upgrade.default_locations || die
 
        # elog dir must exist to avoid logrotate error for bug #415911.
        # This code runs in preinst in order to bypass the mapping of