summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-02-08 21:16:04 -0600
committerDan McGee <dan@archlinux.org>2011-02-11 10:23:43 -0600
commit56721c12cec02366816130aafaa974667db59a93 (patch)
tree3ceac47a7da2836b3309d48276ff94fc60ec5650 /lib/libalpm
parent62fc966882aab2807c515614332ea74f848a5cf3 (diff)
downloadpacman-56721c12cec02366816130aafaa974667db59a93.tar.xz
Fix fileconflict progress with only one package
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/conflict.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index 17e728a5..ca15dbe3 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -383,7 +383,7 @@ static int dir_belongsto_pkg(char *dirpath, pmpkg_t *pkg)
return(0);
}
} else {
- if(alpm_list_find_str(alpm_pkg_get_files(pkg),path)) {
+ if(alpm_list_find_str(alpm_pkg_get_files(pkg), path)) {
continue;
} else {
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
* here as we do when we actually extract files in add.c with our 12
* 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;
pmpkg_t *p1, *p2, *dbpkg;
char path[PATH_MAX+1];
@@ -554,6 +554,8 @@ alpm_list_t *_alpm_db_find_fileconflicts(pmdb_t *db, pmtrans_t *trans,
}
FREELIST(tmpfiles);
}
+ PROGRESS(trans, PM_TRANS_PROGRESS_CONFLICTS_START, "", 100,
+ numtargs, current);
return(conflicts);
}