diff options
Diffstat (limited to 'src/commit.c')
-rw-r--r-- | src/commit.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/commit.c b/src/commit.c index 8030692..857c7bc 100644 --- a/src/commit.c +++ b/src/commit.c @@ -122,6 +122,7 @@ struct progress { struct apk_stats done; struct apk_stats total; struct apk_package *pkg; + int flags; }; static void progress_cb(void *ctx, size_t pkg_percent) @@ -137,9 +138,8 @@ static void progress_cb(void *ctx, size_t pkg_percent) prog->total.bytes + prog->total.packages); else percent = 0; - if (pkg_percent == 0) - percent |= APK_PRINT_PROGRESS_FORCE; - apk_print_progress(percent); + apk_print_progress(percent | prog->flags); + prog->flags = 0; } static int dump_packages(struct apk_changeset *changeset, @@ -298,6 +298,7 @@ int apk_solver_commit_changeset(struct apk_database *db, if (print_change(db, change, prog.done.changes, prog.total.changes)) { prog.pkg = change->new_pkg; + prog.flags = APK_PRINT_PROGRESS_FORCE; progress_cb(&prog, 0); if (!(apk_flags & APK_SIMULATE)) { |