Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: Mike Gilbert <floppym@g.o>
Subject: Re: [gentoo-dev] [PATCH v2] python-utils-r1.eclass: avoid nested ebegin calls
Date: Mon, 11 Jul 2022 14:29:18
Message-Id: 39d04c58afc8c5ec6ba7cbc220b1584d9638e2e9.camel@gentoo.org
In Reply to: [gentoo-dev] [PATCH v2] python-utils-r1.eclass: avoid nested ebegin calls by Mike Gilbert
1 On Mon, 2022-07-11 at 09:16 -0400, Mike Gilbert wrote:
2 > It's common for python_check_deps to call python_has_version, which
3 > calls ebegin itself.
4 >
5 > Signed-off-by: Mike Gilbert <floppym@g.o>
6 > ---
7 > eclass/python-utils-r1.eclass | 9 ++++++---
8 > 1 file changed, 6 insertions(+), 3 deletions(-)
9 >
10 > diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
11 > index a18ca58475f..5c678c524ae 100644
12 > --- a/eclass/python-utils-r1.eclass
13 > +++ b/eclass/python-utils-r1.eclass
14 > @@ -1399,9 +1399,12 @@ _python_run_check_deps() {
15 >
16 > local PYTHON_USEDEP="python_targets_${impl}(-)"
17 > local PYTHON_SINGLE_USEDEP="python_single_target_${impl}(-)"
18 > - ebegin " python_check_deps"
19 > - python_check_deps
20 > - eend ${?}
21 > + einfo " python_check_deps"
22 > + if python_check_deps; then
23 > + einfo " python_check_deps succeeded"
24 > + else
25 > + einfo " python_check_deps failed"
26 > + fi
27 > }
28 >
29 > # @FUNCTION: python_has_version
30
31 WFM. Please don't push it yet, I'll ask ionen to add it on top of his
32 patchset for a single merge.
33
34 --
35 Best regards,
36 Michał Górny