Gentoo Archives: gentoo-dev

From: Ionen Wolkens <ionen@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH v2] python-utils-r1.eclass: avoid nested ebegin calls
Date: Mon, 11 Jul 2022 17:17:50
Message-Id: YsxbNVSKsWCMsILB@eversor
In Reply to: Re: [gentoo-dev] [PATCH v2] python-utils-r1.eclass: avoid nested ebegin calls by Mike Gilbert
1 On Mon, Jul 11, 2022 at 01:08:52PM -0400, Mike Gilbert wrote:
2 > On Mon, Jul 11, 2022 at 12:56 PM Ulrich Mueller <ulm@g.o> wrote:
3 > >
4 > > >>>>> On Mon, 11 Jul 2022, Ionen Wolkens wrote:
5 > > >> - ebegin " python_check_deps"
6 > > >> - python_check_deps
7 > > >> - eend ${?}
8 > > >> + einfo " python_check_deps"
9 > > >> + if python_check_deps; then
10 > > >> + einfo " python_check_deps succeeded"
11 > > >> + else
12 > > >> + einfo " python_check_deps failed"
13 > > >> + fi
14 > > >> }
15 > >
16 > > > I was about to go about merging this as suggested, but this masks the
17 > > > return value, and then things like this always succeed:
18 > >
19 > > > if _python_run_check_deps "${impl}"; then
20 > >
21 > > Maybe leave ebegin/eend in place then, which was invented precisely for
22 > > this use case? What's so bad about nesting it?
23 >
24 > It leads to odd looking output.
25 >
26 > https://gitweb.gentoo.org/proj/portage.git/commit/?id=eba088af8f335c0adb386461e6df1267e24800e7
27 >
28
29 Isn't that a portage problem? I don't think stopping legitimate use
30 because portage displays messages weird is the right thing to do but
31 should rather improve how portage displays them in this situation.
32
33 --
34 ionen

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies