# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1457 2014/12/11 09:07:04 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1458 2014/12/11 18:32:30 mgorny Exp $
+
+ 11 Dec 2014; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
+ Always restore initial directory after sub-phase run. Fixes bug #532168 and
+ possibly more.
11 Dec 2014; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
Restore using separate HOMEs for Python implementations, because of
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.105 2014/12/11 09:07:04 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.106 2014/12/11 18:32:30 mgorny Exp $
# @ECLASS: distutils-r1
# @MAINTAINER:
if [[ ${DISTUTILS_IN_SOURCE_BUILD} ]]; then
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
- pushd "${BUILD_DIR}" >/dev/null || die
+ cd "${BUILD_DIR}" || die
fi
local BUILD_DIR=${BUILD_DIR}/build
fi
"${@}"
- if [[ ${DISTUTILS_IN_SOURCE_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]]
- then
- popd >/dev/null || die
- fi
+ cd "${_DISTUTILS_INITIAL_CWD}" || die
}
# @FUNCTION: _distutils-r1_run_common_phase
local DISTUTILS_ORIG_BUILD_DIR=${BUILD_DIR}
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
+ local _DISTUTILS_INITIAL_CWD=${PWD}
local MULTIBUILD_VARIANTS
_python_obtain_impls
_distutils-r1_run_foreach_impl() {
debug-print-function ${FUNCNAME} "${@}"
+ # store for restoring after distutils-r1_run_phase.
+ local _DISTUTILS_INITIAL_CWD=${PWD}
set -- distutils-r1_run_phase "${@}"
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then