Add failure handling for pushd/popd calls.
authorMichał Górny <mgorny@gentoo.org>
Sat, 26 Nov 2011 20:42:02 +0000 (20:42 +0000)
committerMichał Górny <mgorny@gentoo.org>
Sat, 26 Nov 2011 20:42:02 +0000 (20:42 +0000)
eclass/ChangeLog
eclass/autotools-utils.eclass

index bd8bcc66bd31be1e5968dc646a872387258c8cb7..953f003f1c141e8cf26612563a3a206faab392aa 100644 (file)
@@ -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 <mgorny@gentoo.org> autotools-utils.eclass:
+  Add failure handling for pushd/popd calls.
 
   24 Nov 2011; Ralph Sennhauser <sera@gentoo.org> java-vm-2.eclass:
   set_java_env(): Substitute @SLOT@ in vm env files
index bf9c9ac97b216cea89aab786ff7306ad32706b58..f3826d0fe28b44cf9daac54465f7db1f0827848c 100644 (file)
@@ -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
 }