diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-10-15 23:54:43 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-10-15 23:54:43 +0000 |
commit | ac30eb2c1e452df5c4e4992038b24b26cfcd5ced (patch) | |
tree | 7f64aa644a961c55f6f8e58eb16c2d54e661d81c /lib/libalpm/conflict.c | |
parent | 04c48b4547e2a0710b0160b43644310f52db25f0 (diff) | |
download | pacman-ac30eb2c1e452df5c4e4992038b24b26cfcd5ced.tar.xz |
Applied Frugalware patch from Christian Hamar alias krix <krics@linuxforum.hu>
for file-conflict progress bar
Also did some CVS cleanup, removing some of the autogenerated files that
shouldn't have been there
Diffstat (limited to 'lib/libalpm/conflict.c')
-rw-r--r-- | lib/libalpm/conflict.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index 8cfe0f6e..2c63143e 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -201,21 +201,24 @@ PMList *_alpm_checkconflicts(pmdb_t *db, PMList *packages) return(baddeps); } -PMList *_alpm_db_find_conflicts(pmdb_t *db, PMList *targets, char *root, PMList **skip_list) +PMList *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root, PMList **skip_list) { PMList *i, *j, *k; char *filestr = NULL; char path[PATH_MAX+1]; struct stat buf, buf2; PMList *conflicts = NULL; + PMList *targets = trans->packages; + double percent; if(db == NULL || targets == NULL || root == NULL) { return(NULL); } - /* CHECK 1: check every target against every target */ for(i = targets; i; i = i->next) { pmpkg_t *p1 = (pmpkg_t*)i->data; + percent = (double)(_alpm_list_count(targets) - _alpm_list_count(i) + 1) / _alpm_list_count(targets); + PROGRESS(trans, PM_TRANS_PROGRESS_CONFLICTS_START, "", (percent * 100), _alpm_list_count(targets), (_alpm_list_count(targets) - _alpm_list_count(i) +1)); for(j = i; j; j = j->next) { pmpkg_t *p2 = (pmpkg_t*)j->data; if(strcmp(p1->name, p2->name)) { |