1 |
On Mon, Jul 11, 2022 at 2:20 PM Mike Gilbert <floppym@g.o> wrote: |
2 |
> |
3 |
> On Mon, Jul 11, 2022 at 2:01 PM Anna <cyber+gentoo@×××××.in> wrote: |
4 |
> > |
5 |
> > On 2022-07-11 19:57, Ulrich Mueller wrote: |
6 |
> > > >>>>> On Mon, 11 Jul 2022, Mike Gilbert wrote: |
7 |
> > > |
8 |
> > > >> Maybe leave ebegin/eend in place then, which was invented precisely for |
9 |
> > > >> this use case? What's so bad about nesting it? |
10 |
> > > |
11 |
> > > > It leads to odd looking output. |
12 |
> > > |
13 |
> > > > https://gitweb.gentoo.org/proj/portage.git/commit/?id=eba088af8f335c0adb386461e6df1267e24800e7 |
14 |
> > > |
15 |
> > > IIUC it would look like this, with the patch applied: |
16 |
> > > |
17 |
> > > * task 1 |
18 |
> > > * Doing task 2 ... [ ok ] |
19 |
> > > * task 1 succeeded |
20 |
> > > |
21 |
> > > That's not the most beautiful of outputs either. |
22 |
> > |
23 |
> > I think ebegin/eend output should be buffered so it can be nested |
24 |
> > properly. |
25 |
> > |
26 |
> |
27 |
> My take: the main purpose of ebegin is to inform the user that we are |
28 |
> starting a silent long-running task. eend tells you the result of that |
29 |
> task. |
30 |
> |
31 |
> Buffering ebegin calls would sort of defeat that purpose of informing |
32 |
> the user that something is happening. |
33 |
> |
34 |
> In other words, I don't think it makes sense to call ebegin before |
35 |
> starting a task that is expected to produce output. This includes |
36 |
> tasks that call ebegin themselves, since ebegin always produces |
37 |
> output. |
38 |
|
39 |
I've decided this is a hill I don't want to die on, so I've submitted |
40 |
a PR to update the QA check. |
41 |
|
42 |
https://github.com/gentoo/portage/pull/854 |