diff options
author | Mike Pagano <mpagano@gentoo.org> | 2010-07-30 00:44:59 +0000 |
---|---|---|
committer | Mike Pagano <mpagano@gentoo.org> | 2010-07-30 00:44:59 +0000 |
commit | 77811f4ed6e50bfdf71b24fd0fdc8bc5d0664437 (patch) | |
tree | bf632c82b5d50f6855cc8379e8a3744810ec434f /eclass/kernel-2.eclass | |
parent | Empty src_test() wrt #294302 by Diego E. Pettenò. (diff) | |
download | historical-77811f4ed6e50bfdf71b24fd0fdc8bc5d0664437.tar.gz historical-77811f4ed6e50bfdf71b24fd0fdc8bc5d0664437.tar.bz2 historical-77811f4ed6e50bfdf71b24fd0fdc8bc5d0664437.zip |
Proper use of shopt functions from eutils. Thanks to Vapier for the patch.
Diffstat (limited to 'eclass/kernel-2.eclass')
-rw-r--r-- | eclass/kernel-2.eclass | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass index bf331cf33062..0c91357a6fa2 100644 --- a/eclass/kernel-2.eclass +++ b/eclass/kernel-2.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.237 2010/07/19 20:19:18 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.238 2010/07/30 00:44:59 mpagano Exp $ # Description: kernel.eclass rewrite for a clean base regarding the 2.6 # series of kernel with back-compatibility for 2.4 @@ -779,7 +779,7 @@ setup_headers() { #============================================================== unipatch() { local i x y z extention PIPE_CMD UNIPATCH_DROP KPATCH_DIR PATCH_DEPTH ELINE - local STRICT_COUNT PATCH_LEVEL myLC_ALL myLANG extglob_bak + local STRICT_COUNT PATCH_LEVEL myLC_ALL myLANG # set to a standard locale to ensure sorts are ordered properly. myLC_ALL="${LC_ALL}" @@ -791,8 +791,7 @@ unipatch() { [ ! -d ${KPATCH_DIR} ] && mkdir -p ${KPATCH_DIR} # We're gonna need it when doing patches with a predefined patchlevel - extglob_bak=$(shopt -p extglob) - shopt -s extglob + eshopts_push -s extglob # This function will unpack all passed tarballs, add any passed patches, and remove any passed patchnumbers # usage can be either via an env var or by params @@ -926,6 +925,7 @@ unipatch() { eend 1 eerror "Failed to apply patch ${i/*\//}" eerror "Please attach ${STDERR_T} to any bug you may post." + eshopts_pop die "Failed to apply ${i/*\//}" fi else @@ -935,6 +935,7 @@ unipatch() { if [ ${PATCH_DEPTH} -eq 5 ]; then eend 1 eerror "Please attach ${STDERR_T} to any bug you may post." + eshopts_pop die "Unable to dry-run patch." fi done @@ -955,7 +956,7 @@ unipatch() { LC_ALL="${myLC_ALL}" LANG="${myLANG}" - eval ${extglob_bak} + eshopts_pop } # getfilevar accepts 2 vars as follows: |