On Sun, Jan 16, 2011 at 6:38 AM, Allan McRae <allan@archlinux.org> wrote:
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@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. For now this seems fine... it would make more sense if we allowed something like `pacman -S mypackage foobar pkg-file-xxx.pkg.tar.gz`.
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 */ } PROGRESS(trans, PM_TRANS_PROGRESS_INTEGRITY_START, "", percent, -- 1.7.3.5