diff options
author | Michał Górny <mgorny@gentoo.org> | 2014-12-11 18:32:30 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2014-12-11 18:32:30 +0000 |
commit | 1812b42d333ea42f2b864ba53c60420f6ab734b6 (patch) | |
tree | ebfed46a6a2b2b6ddeae57dd19a9394a7c33acbe /eclass/distutils-r1.eclass | |
parent | Version bump. (diff) | |
download | historical-1812b42d333ea42f2b864ba53c60420f6ab734b6.tar.gz historical-1812b42d333ea42f2b864ba53c60420f6ab734b6.tar.bz2 historical-1812b42d333ea42f2b864ba53c60420f6ab734b6.zip |
Always restore initial directory after sub-phase run. Fixes bug #532168 and possibly more.
Diffstat (limited to 'eclass/distutils-r1.eclass')
-rw-r--r-- | eclass/distutils-r1.eclass | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 737468e79009..6efa82874e38 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -1,6 +1,6 @@ # 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: @@ -587,7 +587,7 @@ distutils-r1_run_phase() { 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 @@ -617,10 +617,7 @@ distutils-r1_run_phase() { "${@}" - 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 @@ -635,6 +632,7 @@ _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 @@ -654,6 +652,8 @@ _distutils-r1_run_common_phase() { _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 |