]> git.ipfire.org Git - pakfire.git/commitdiff
progress: Never show any status for child-progress meters
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 15 Mar 2025 11:08:30 +0000 (11:08 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 15 Mar 2025 11:08:30 +0000 (11:08 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/progress.c

index cb7fa931decd107ce838ac8ae662afd23b2a48d6..41cd7badadb5efb863a7f2bcebfbb1ecc766c889 100644 (file)
@@ -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;