* [gentoo-dev] [PATCH] epatch.eclass: drop 'estach.eclass' usage
@ 2018-08-11 0:02 Sergei Trofimovich
2018-08-18 23:30 ` [gentoo-dev] " Sergei Trofimovich
0 siblings, 1 reply; 2+ messages in thread
From: Sergei Trofimovich @ 2018-08-11 0:02 UTC (permalink / raw
To: gentoo-dev; +Cc: Sergei Trofimovich, mgorny, base-system
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 <slyfox@gentoo.org>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-dev] Re: [PATCH] epatch.eclass: drop 'estach.eclass' usage
2018-08-11 0:02 [gentoo-dev] [PATCH] epatch.eclass: drop 'estach.eclass' usage Sergei Trofimovich
@ 2018-08-18 23:30 ` Sergei Trofimovich
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Trofimovich @ 2018-08-18 23:30 UTC (permalink / raw
To: gentoo-dev
On Sat, 11 Aug 2018 01:02:23 +0100
Sergei Trofimovich <slyfox@gentoo.org> wrote:
> 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 <slyfox@gentoo.org>
> ---
> eclass/epatch.eclass | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
Pushed as:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b21e386a064e1ed49981d9527f968ddc5e1eeb86
--
Sergei
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-18 23:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-11 0:02 [gentoo-dev] [PATCH] epatch.eclass: drop 'estach.eclass' usage Sergei Trofimovich
2018-08-18 23:30 ` [gentoo-dev] " Sergei Trofimovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox