From 52d7c612bd3c568c8a4c184db821690f60b9e89b Mon Sep 17 00:00:00 2001 From: Daniel Drake Date: Thu, 25 Jan 2007 22:06:35 +0000 Subject: [PATCH] =?utf8?q?save=20and=20restore=20shell=20options,=20thanks?= =?utf8?q?=20to=20Sandro=20in=20bug=20=C3=82#162121?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- eclass/kernel-2.eclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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: -- 2.26.2