On Mon, Jul 11, 2022 at 2:01 PM Anna <cyber+gen...@sysrq.in> wrote: > > On 2022-07-11 19:57, Ulrich Mueller wrote: > > >>>>> On Mon, 11 Jul 2022, Mike Gilbert wrote: > > > > >> Maybe leave ebegin/eend in place then, which was invented precisely for > > >> this use case? What's so bad about nesting it? > > > > > It leads to odd looking output. > > > > > https://gitweb.gentoo.org/proj/portage.git/commit/?id=eba088af8f335c0adb386461e6df1267e24800e7 > > > > IIUC it would look like this, with the patch applied: > > > > * task 1 > > * Doing task 2 ... [ ok ] > > * task 1 succeeded > > > > That's not the most beautiful of outputs either. > > I think ebegin/eend output should be buffered so it can be nested > properly. >
My take: the main purpose of ebegin is to inform the user that we are starting a silent long-running task. eend tells you the result of that task. Buffering ebegin calls would sort of defeat that purpose of informing the user that something is happening. In other words, I don't think it makes sense to call ebegin before starting a task that is expected to produce output. This includes tasks that call ebegin themselves, since ebegin always produces output.