[pacman-dev] [PATCH] Fix integrity check status when installing from file

Allan McRae allan at archlinux.org
Sun Jan 16 07:38:11 EST 2011

When installing packages from a file, the integrity check count
stays at (0/x) complete.  This ensures it is bumped to (x/x) at
the end of the process.

Signed-off-by: Allan McRae <allan at archlinux.org>

I'm not sure this is the best way to fix this issue...  But given the
loop is essentially doing nothing in this case, I do not see the point
in updating the progress bar as we go.

 lib/libalpm/sync.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index b1eab55..bbb319c 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -957,6 +957,7 @@ int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data)
 		pmpkg_t *spkg = i->data;
 		int percent = (current * 100) / numtargs;
 		if(spkg->origin == PKG_FROM_FILE) {
+			current++;
 			continue; /* pkg_load() has been already called, this package is valid */

More information about the pacman-dev mailing list