From 709cb3751dbf160e3a7195cab928d9f8835f7a79 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 26 Nov 2011 20:42:02 +0000 Subject: [PATCH] Add failure handling for pushd/popd calls. --- eclass/ChangeLog | 5 ++++- eclass/autotools-utils.eclass | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/eclass/ChangeLog b/eclass/ChangeLog index bd8bcc66bd31..953f003f1c14 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.26 2011/11/24 20:05:01 sera Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.27 2011/11/26 20:42:02 mgorny Exp $ + + 26 Nov 2011; Michał Górny autotools-utils.eclass: + Add failure handling for pushd/popd calls. 24 Nov 2011; Ralph Sennhauser java-vm-2.eclass: set_java_env(): Substitute @SLOT@ in vm env files diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass index bf9c9ac97b21..f3826d0fe28b 100644 --- a/eclass/autotools-utils.eclass +++ b/eclass/autotools-utils.eclass @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.25 2011/10/14 20:28:29 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.26 2011/11/26 20:42:02 mgorny Exp $ # @ECLASS: autotools-utils.eclass # @MAINTAINER: @@ -256,9 +256,9 @@ autotools-utils_src_configure() { _check_build_dir mkdir -p "${AUTOTOOLS_BUILD_DIR}" || die "mkdir '${AUTOTOOLS_BUILD_DIR}' failed" - pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null + pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null || die base_src_configure "${econfargs[@]}" "$@" - popd > /dev/null + popd > /dev/null || die } # @FUNCTION: autotools-utils_src_compile @@ -268,9 +268,9 @@ autotools-utils_src_compile() { debug-print-function ${FUNCNAME} "$@" _check_build_dir - pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null + pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null || die base_src_compile "$@" - popd > /dev/null + popd > /dev/null || die } # @FUNCTION: autotools-utils_src_install @@ -285,9 +285,9 @@ autotools-utils_src_install() { debug-print-function ${FUNCNAME} "$@" _check_build_dir - pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null + pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null || die base_src_install "$@" - popd > /dev/null + popd > /dev/null || die # Remove libtool files and unnecessary static libs remove_libtool_files @@ -300,8 +300,8 @@ autotools-utils_src_test() { debug-print-function ${FUNCNAME} "$@" _check_build_dir - pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null + pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null || die # Run default src_test as defined in ebuild.sh default_src_test - popd > /dev/null + popd > /dev/null || die } -- 2.26.2