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

Dan McGee dpmcgee at gmail.com
Tue Jan 18 14:01:17 EST 2011


On Sun, Jan 16, 2011 at 6:38 AM, Allan McRae <allan at 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 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.
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
>
>
>


More information about the pacman-dev mailing list