From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 267CB138334 for ; Sat, 11 Aug 2018 00:03:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7BF07E089A; Sat, 11 Aug 2018 00:03:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 30932E0893 for ; Sat, 11 Aug 2018 00:03:34 +0000 (UTC) Received: from sf.home (host81-147-9-77.range81-147.btcentralplus.com [81.147.9.77]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: slyfox) by smtp.gentoo.org (Postfix) with ESMTPSA id C9161335C9A; Sat, 11 Aug 2018 00:03:31 +0000 (UTC) Received: by sf.home (Postfix, from userid 1000) id D6B322061A844; Sat, 11 Aug 2018 01:03:25 +0100 (BST) From: Sergei Trofimovich To: gentoo-dev@lists.gentoo.org Cc: Sergei Trofimovich , mgorny@gentoo.org, base-system@gentoo.org Subject: [gentoo-dev] [PATCH] epatch.eclass: drop 'estach.eclass' usage Date: Sat, 11 Aug 2018 01:02:23 +0100 Message-Id: <20180811000223.24796-1-slyfox@gentoo.org> X-Mailer: git-send-email 2.18.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: 5a6c0816-a645-48ba-80f4-393d462aa455 X-Archives-Hash: 3a070b31d133a0ade12b1bd066bd01e5 Avoid use of eshopts_push / eshopts_pop functions as they don't preserve expand_aliases shell option and get detected by QA warning as: * QA Notice: Global shell options changed and were not restored while calling 'src_prepare' Ssee bug #662586 for details. Tested as: $ EPATCH_USER_EXCLUDE="*" ebuild gcc-8.2.0.ebuild clean prepare CC: mgorny@gentoo.org CC: base-system@gentoo.org Bug: https://bugs.gentoo.org/662586 Signed-off-by: Sergei Trofimovich --- eclass/epatch.eclass | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/eclass/epatch.eclass b/eclass/epatch.eclass index 8e03478c26c..bdb141ebb70 100644 --- a/eclass/epatch.eclass +++ b/eclass/epatch.eclass @@ -18,8 +18,6 @@ case ${EAPI:-0} in die "${ECLASS}: banned in EAPI=${EAPI}; use eapply* instead";; esac -inherit estack - # @VARIABLE: EPATCH_SOURCE # @DESCRIPTION: # Default directory to search for patches. @@ -210,13 +208,14 @@ epatch() { # Let people filter things dynamically if [[ -n ${EPATCH_EXCLUDE}${EPATCH_USER_EXCLUDE} ]] ; then # let people use globs in the exclude - eshopts_push -o noglob + local prev_noglob=$(shopt -p -o noglob) + set -o noglob local ex for ex in ${EPATCH_EXCLUDE} ; do if [[ ${patchname} == ${ex} ]] ; then einfo " Skipping ${patchname} due to EPATCH_EXCLUDE ..." - eshopts_pop + ${prev_noglob} continue 2 fi done @@ -224,12 +223,12 @@ epatch() { for ex in ${EPATCH_USER_EXCLUDE} ; do if [[ ${patchname} == ${ex} ]] ; then einfo " Skipping ${patchname} due to EPATCH_USER_EXCLUDE ..." - eshopts_pop + ${prev_noglob} continue 2 fi done - eshopts_pop + ${prev_noglob} fi if [[ ${SINGLE_PATCH} == "yes" ]] ; then -- 2.18.0