[pacman-dev] [PATCH] Fix integrity check status when installing from file
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
On Sun, Jan 16, 2011 at 6:38 AM, Allan McRae
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
--- 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
On Tue, Jan 18, 2011 at 1:01 PM, Dan McGee
On Sun, Jan 16, 2011 at 6:38 AM, Allan McRae
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
--- 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`.
And on that note, I've taken this patch but also "added" current++ calls in the two other early "continue" loop exits- by instead making the counter the responsibility of the for loop. Revised patch on the way. -Dan
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: Dan McGee
On 19/01/11 05:20, Dan McGee 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: Dan McGee
Signoff-off-by: Allan This seems a much more sane way to do this.
participants (3)
-
Allan McRae
-
Dan McGee
-
Dan McGee