dev-python/six: cd "${HOME}" in pkg_preinst

Package-Manager: portage-2.3.1_p4_p808957
This commit is contained in:
Mike Gilbert
2016-10-03 11:31:37 -04:00
parent e9aa58b9a7
commit 016c65498f

View File

@@ -58,8 +58,11 @@ python_install_all() {
distutils-r1_python_install_all
}
# Remove pkg_preinst in the next version bump
pkg_preinst() {
# Remove this in the next version bump
# https://bugs.gentoo.org/585146
cd "${HOME}" || die
_cleanup() {
local pyver=$("${PYTHON}" -c "from distutils.sysconfig import get_python_version; print(get_python_version())")
local egginfo="${ROOT%/}$(python_get_sitedir)/${P}-py${pyver}.egg-info"
@@ -68,10 +71,5 @@ pkg_preinst() {
rm -r "${egginfo}" || die "Failed to remove egg-info directory"
fi
}
# https://bugs.gentoo.org/585146
local tmpdir="$(mktemp -d)"
[[ -n ${tmpdir} ]] || die
cd "${tmpdir}" || die
python_foreach_impl _cleanup
rmdir "${tmpdir}"
}