[arch-general] pacman 6 current/total not displayed on TDE - what does old konsole lack?

David C. Rankin drankinatty at gmail.com
Sun Dec 12 06:14:45 UTC 2021


All,

  As mentioned in an earlier thread, the new pacman current/total update
scheme causes the old KDE3/TDE konsole output to look jittery instead of
updating the multi-line progress bar.

  I'm trying to track down why so we can patch TDE konsole to fix the problem,
but I'm having a difficult time chasing down just exactly what is being
written that is causing the problem.

  I've chased through callback.c:

static void dload_progress_event(const char *filename,
alpm_download_event_progress_t *data)

  Where the update is done,

https://gitlab.archlinux.org/pacman/pacman/-/blob/master/src/pacman/callback.c#L981

  Either with console_cursor_goto_bar(index) for the current file or
console_cursor_move_end() for the total and those are simple ANSI escapes from
util.c:

/* Moves console cursor `lines` up */
void console_cursor_move_up(unsigned int lines)
{
	printf("\x1B[%dF", lines);
}

/* Moves console cursor `lines` down */
void console_cursor_move_down(unsigned int lines)
{
	printf("\x1B[%dE", lines);
}

/* Erases line from the current cursor position till the end of the line */
void console_erase_line(void)
{
	printf("\x1B[K");
}

What is it that the new pacman is doing with the multi-line progress bar
TDE/konsole lacks?



-- 
David C. Rankin, J.D.,P.E.


More information about the arch-general mailing list