Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 18 Aug 2018 23:28:20
Message-Id: 1534634884.b21e386a064e1ed49981d9527f968ddc5e1eeb86.slyfox@gentoo
1 commit: b21e386a064e1ed49981d9527f968ddc5e1eeb86
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 10 23:46:23 2018 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 18 23:28:04 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b21e386a
7
8 epatch.eclass: drop 'estack.eclass' usage
9
10 Avoid use of eshopts_push / eshopts_pop functions
11 as they don't preserve expand_aliases shell option
12 and get detected by QA warning as:
13 * QA Notice: Global shell options changed and were
14 not restored while calling 'src_prepare'
15
16 Ssee bug #662586 for details.
17
18 Tested as:
19 $ EPATCH_USER_EXCLUDE="*" ebuild gcc-8.2.0.ebuild clean prepare
20
21 Bug: https://bugs.gentoo.org/662586
22 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
23
24 eclass/epatch.eclass | 11 +++++------
25 1 file changed, 5 insertions(+), 6 deletions(-)
26
27 diff --git a/eclass/epatch.eclass b/eclass/epatch.eclass
28 index da936413677..1ea657a3b6f 100644
29 --- a/eclass/epatch.eclass
30 +++ b/eclass/epatch.eclass
31 @@ -19,8 +19,6 @@ case ${EAPI:-0} in
32 die "${ECLASS}: banned in EAPI=${EAPI}; use eapply* instead";;
33 esac
34
35 -inherit estack
36 -
37 # @VARIABLE: EPATCH_SOURCE
38 # @DESCRIPTION:
39 # Default directory to search for patches.
40 @@ -211,13 +209,14 @@ epatch() {
41 # Let people filter things dynamically
42 if [[ -n ${EPATCH_EXCLUDE}${EPATCH_USER_EXCLUDE} ]] ; then
43 # let people use globs in the exclude
44 - eshopts_push -o noglob
45 + local prev_noglob=$(shopt -p -o noglob)
46 + set -o noglob
47
48 local ex
49 for ex in ${EPATCH_EXCLUDE} ; do
50 if [[ ${patchname} == ${ex} ]] ; then
51 einfo " Skipping ${patchname} due to EPATCH_EXCLUDE ..."
52 - eshopts_pop
53 + ${prev_noglob}
54 continue 2
55 fi
56 done
57 @@ -225,12 +224,12 @@ epatch() {
58 for ex in ${EPATCH_USER_EXCLUDE} ; do
59 if [[ ${patchname} == ${ex} ]] ; then
60 einfo " Skipping ${patchname} due to EPATCH_USER_EXCLUDE ..."
61 - eshopts_pop
62 + ${prev_noglob}
63 continue 2
64 fi
65 done
66
67 - eshopts_pop
68 + ${prev_noglob}
69 fi
70
71 if [[ ${SINGLE_PATCH} == "yes" ]] ; then