From: Michael Tremer Date: Sat, 15 Mar 2025 11:08:30 +0000 (+0000) Subject: progress: Never show any status for child-progress meters X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=315e06da7bbe5540c4d3a6f46dafc3d3bf37489d;p=pakfire.git progress: Never show any status for child-progress meters Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/progress.c b/src/pakfire/progress.c index cb7fa931..41cd7bad 100644 --- a/src/pakfire/progress.c +++ b/src/pakfire/progress.c @@ -122,9 +122,15 @@ int pakfire_progress_create(struct pakfire_progress** progress, p->state = PAKFIRE_PROGRESS_INIT; // Store a reference to the parent - if (parent) + if (parent) { p->parent = pakfire_progress_ref(parent); + // Automatically disable showing any progress ourselves. This is so that + // we can have a single progress meter that has lots of children to track + // the status of multiple sub-operations. + p->flags |= PAKFIRE_PROGRESS_NO_PROGRESS; + } + // Configure some default callbacks p->callbacks.start = pakfire_progress_default_start_callback;