Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: Gentoo Dev <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:09:12
Message-Id: CAJ0EP43dpNt9Nm13jOiz7moUodMVDMzLWCNme=bKyrCmtkzRvA@mail.gmail.com
In Reply to: Re: [gentoo-dev] [PATCH v2] python-utils-r1.eclass: avoid nested ebegin calls by Ulrich Mueller
1 On Mon, Jul 11, 2022 at 12:56 PM Ulrich Mueller <ulm@g.o> wrote:
2 >
3 > >>>>> On Mon, 11 Jul 2022, Ionen Wolkens wrote:
4 > >> - ebegin " python_check_deps"
5 > >> - python_check_deps
6 > >> - eend ${?}
7 > >> + einfo " python_check_deps"
8 > >> + if python_check_deps; then
9 > >> + einfo " python_check_deps succeeded"
10 > >> + else
11 > >> + einfo " python_check_deps failed"
12 > >> + fi
13 > >> }
14 >
15 > > I was about to go about merging this as suggested, but this masks the
16 > > return value, and then things like this always succeed:
17 >
18 > > if _python_run_check_deps "${impl}"; then
19 >
20 > Maybe leave ebegin/eend in place then, which was invented precisely for
21 > this use case? What's so bad about nesting it?
22
23 It leads to odd looking output.
24
25 https://gitweb.gentoo.org/proj/portage.git/commit/?id=eba088af8f335c0adb386461e6df1267e24800e7

Replies