1 |
Avoid use of eshopts_push / eshopts_pop functions |
2 |
as they don't preserve expand_aliases shell option |
3 |
and get detected by QA warning as: |
4 |
* QA Notice: Global shell options changed and were |
5 |
not restored while calling 'src_prepare' |
6 |
|
7 |
Ssee bug #662586 for details. |
8 |
|
9 |
Tested as: |
10 |
$ EPATCH_USER_EXCLUDE="*" ebuild gcc-8.2.0.ebuild clean prepare |
11 |
|
12 |
CC: mgorny@g.o |
13 |
CC: base-system@g.o |
14 |
Bug: https://bugs.gentoo.org/662586 |
15 |
Signed-off-by: Sergei Trofimovich <slyfox@g.o> |
16 |
--- |
17 |
eclass/epatch.eclass | 11 +++++------ |
18 |
1 file changed, 5 insertions(+), 6 deletions(-) |
19 |
|
20 |
diff --git a/eclass/epatch.eclass b/eclass/epatch.eclass |
21 |
index 8e03478c26c..bdb141ebb70 100644 |
22 |
--- a/eclass/epatch.eclass |
23 |
+++ b/eclass/epatch.eclass |
24 |
@@ -18,8 +18,6 @@ case ${EAPI:-0} in |
25 |
die "${ECLASS}: banned in EAPI=${EAPI}; use eapply* instead";; |
26 |
esac |
27 |
|
28 |
-inherit estack |
29 |
- |
30 |
# @VARIABLE: EPATCH_SOURCE |
31 |
# @DESCRIPTION: |
32 |
# Default directory to search for patches. |
33 |
@@ -210,13 +208,14 @@ epatch() { |
34 |
# Let people filter things dynamically |
35 |
if [[ -n ${EPATCH_EXCLUDE}${EPATCH_USER_EXCLUDE} ]] ; then |
36 |
# let people use globs in the exclude |
37 |
- eshopts_push -o noglob |
38 |
+ local prev_noglob=$(shopt -p -o noglob) |
39 |
+ set -o noglob |
40 |
|
41 |
local ex |
42 |
for ex in ${EPATCH_EXCLUDE} ; do |
43 |
if [[ ${patchname} == ${ex} ]] ; then |
44 |
einfo " Skipping ${patchname} due to EPATCH_EXCLUDE ..." |
45 |
- eshopts_pop |
46 |
+ ${prev_noglob} |
47 |
continue 2 |
48 |
fi |
49 |
done |
50 |
@@ -224,12 +223,12 @@ epatch() { |
51 |
for ex in ${EPATCH_USER_EXCLUDE} ; do |
52 |
if [[ ${patchname} == ${ex} ]] ; then |
53 |
einfo " Skipping ${patchname} due to EPATCH_USER_EXCLUDE ..." |
54 |
- eshopts_pop |
55 |
+ ${prev_noglob} |
56 |
continue 2 |
57 |
fi |
58 |
done |
59 |
|
60 |
- eshopts_pop |
61 |
+ ${prev_noglob} |
62 |
fi |
63 |
|
64 |
if [[ ${SINGLE_PATCH} == "yes" ]] ; then |
65 |
-- |
66 |
2.18.0 |