From 44abee7ebde3ca571ec3b7c6164d43f5e563f604 Mon Sep 17 00:00:00 2001 From: Daniel Drake Date: Thu, 25 Jan 2007 22:06:35 +0000 Subject: save and restore shell options, thanks to Sandro in bug Â#162121 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eclass/kernel-2.eclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'eclass') diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass index 9879c6d4693b..29e51e677391 100644 --- a/eclass/kernel-2.eclass +++ b/eclass/kernel-2.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.200 2007/01/02 01:43:34 dsd Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.201 2007/01/25 22:06:35 dsd Exp $ # Description: kernel.eclass rewrite for a clean base regarding the 2.6 # series of kernel with back-compatibility for 2.4 @@ -694,7 +694,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 + local STRICT_COUNT PATCH_LEVEL myLC_ALL myLANG extglob_bak # set to a standard locale to ensure sorts are ordered properly. myLC_ALL="${LC_ALL}" @@ -706,6 +706,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 # This function will unpack all passed tarballs, add any passed patches, and remove any passed patchnumbers @@ -867,6 +868,7 @@ unipatch() { LC_ALL="${myLC_ALL}" LANG="${myLANG}" + eval ${extglob_bak} } # getfilevar accepts 2 vars as follows: -- cgit v1.2.3-65-gdbad