summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pagano <mpagano@gentoo.org>2010-07-30 00:44:59 +0000
committerMike Pagano <mpagano@gentoo.org>2010-07-30 00:44:59 +0000
commit8ead39f621eff6abec6ae3d9f61046834a10a738 (patch)
treebc8a5e3a8b2d1a43848aa55e1d127791f89a3faf /eclass/kernel-2.eclass
parentEmpty src_test() wrt #294302 by Diego E. Pettenò. (diff)
downloadgentoo-2-8ead39f621eff6abec6ae3d9f61046834a10a738.tar.gz
gentoo-2-8ead39f621eff6abec6ae3d9f61046834a10a738.tar.bz2
gentoo-2-8ead39f621eff6abec6ae3d9f61046834a10a738.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.eclass11
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: