Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] python-utils-r1.eclass: avoid nested ebegin calls
Date: Mon, 11 Jul 2022 12:46:21
Message-Id: 3c78f2b2baedff67032eee5f4570ee640bfb6c32.camel@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH] python-utils-r1.eclass: avoid nested ebegin calls by Mike Gilbert
1 On Mon, 2022-07-11 at 07:36 -0400, Mike Gilbert wrote:
2 > On Mon, Jul 11, 2022 at 3:04 AM Michał Górny <mgorny@g.o> wrote:
3 > >
4 > > On Sun, 2022-07-10 at 23:53 -0400, Mike Gilbert wrote:
5 > > > It's common for python_check_deps to call python_has_version, which
6 > > > calls ebegin itself.
7 > > >
8 > > > Signed-off-by: Mike Gilbert <floppym@g.o>
9 > > > ---
10 > > > eclass/python-utils-r1.eclass | 3 +--
11 > > > 1 file changed, 1 insertion(+), 2 deletions(-)
12 > > >
13 > > > diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
14 > > > index a18ca58475f..acfa83d5e18 100644
15 > > > --- a/eclass/python-utils-r1.eclass
16 > > > +++ b/eclass/python-utils-r1.eclass
17 > > > @@ -1399,9 +1399,8 @@ _python_run_check_deps() {
18 > > >
19 > > > local PYTHON_USEDEP="python_targets_${impl}(-)"
20 > > > local PYTHON_SINGLE_USEDEP="python_single_target_${impl}(-)"
21 > > > - ebegin " python_check_deps"
22 > > > + einfo " python_check_deps"
23 > > > python_check_deps
24 > > > - eend ${?}
25 > > > }
26 > > >
27 > > > # @FUNCTION: python_has_version
28 > >
29 > > What's the harm in nesting them?
30 >
31 > It results in strange looking output, and triggers a QA warning in the
32 > latest version of Portage.
33
34 This change means that if python_check_deps() isn't verbose and returns
35 false, we have no output that it failed. At least make it print
36 the result verbosely then.
37
38 --
39 Best regards,
40 Michał Górny