FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 01-16-2011, 11:38 AM
Allan McRae
 
Default 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 <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.

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
 
Old 01-18-2011, 06:20 PM
Dan McGee
 
Default 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: Dan McGee <dan@archlinux.org>
---
lib/libalpm/sync.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index b1eab55..dbd1506 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -953,7 +953,7 @@ int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data)
EVENT(trans, PM_TRANS_EVT_INTEGRITY_START, NULL, NULL);

errors = 0;
- for(i = trans->add; i; i = i->next) {
+ for(i = trans->add; i; i = i->next, current++) {
pmpkg_t *spkg = i->data;
int percent = (current * 100) / numtargs;
if(spkg->origin == PKG_FROM_FILE) {
@@ -986,7 +986,6 @@ int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data)
pkgfile->reason = spkg->reason; /* copy over install reason */
i->data = pkgfile;
_alpm_pkg_free_trans(spkg); /* spkg has been removed from the target list */
- current++;
}
PROGRESS(trans, PM_TRANS_PROGRESS_INTEGRITY_START, "", 100,
numtargs, current);
--
1.7.3.5
 

Thread Tools




All times are GMT. The time now is 11:37 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org