Fix fileconflict progress with only one package

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-02-08 21:16:04 -06:00
parent 62fc966882
commit 56721c12ce
1 changed files with 4 additions and 2 deletions

View File

@ -383,7 +383,7 @@ static int dir_belongsto_pkg(char *dirpath, pmpkg_t *pkg)
return(0); return(0);
} }
} else { } else {
if(alpm_list_find_str(alpm_pkg_get_files(pkg),path)) { if(alpm_list_find_str(alpm_pkg_get_files(pkg), path)) {
continue; continue;
} else { } else {
closedir(dir); closedir(dir);
@ -415,7 +415,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(pmdb_t *db, pmtrans_t *trans,
* be possible with real transactions. Right now we only do half as much * be possible with real transactions. Right now we only do half as much
* here as we do when we actually extract files in add.c with our 12 * here as we do when we actually extract files in add.c with our 12
* different cases. */ * different cases. */
for(current = 1, i = upgrade; i; i = i->next, current++) { for(current = 0, i = upgrade; i; i = i->next, current++) {
alpm_list_t *k, *tmpfiles = NULL; alpm_list_t *k, *tmpfiles = NULL;
pmpkg_t *p1, *p2, *dbpkg; pmpkg_t *p1, *p2, *dbpkg;
char path[PATH_MAX+1]; char path[PATH_MAX+1];
@ -554,6 +554,8 @@ alpm_list_t *_alpm_db_find_fileconflicts(pmdb_t *db, pmtrans_t *trans,
} }
FREELIST(tmpfiles); FREELIST(tmpfiles);
} }
PROGRESS(trans, PM_TRANS_PROGRESS_CONFLICTS_START, "", 100,
numtargs, current);
return(conflicts); return(conflicts);
} }