From 436f36c76b74f7580da48e618dbdbd78037736fb Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Wed, 21 Feb 2007 06:44:14 +0000 Subject: * Re-added a compare function for syncpkg's - it was removed without thinking properly * Error when re-reading the DB for replacements, wrong info level * Removed an duplicate debug message "checking for package replacements" * Check ignorepkg for REAL upgrades... * Properly check the NOSAVE flag * some unlink_file (remove.c) cleanup * fix indent level on handle.c * Force libalpm paths to end with a '/' char * Fixed 'target' looping in conflict.c (pmsyncpkg_t, not pmpkg_t) * Added some debug output to cache and db scanning ** All pactest tests succeed again, yay ** --- lib/libalpm/conflict.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/conflict.c') diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index a5f9590f..2846d9e8 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -379,9 +379,16 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root) /* stat the file - if it exists and is not a dir, do some checks */ if(lstat(path, &buf) == 0 && !S_ISDIR(buf.st_mode)) { + /* Look at all the targets to see if file has changed hands */ for(k = targets; k; k = k->next) { - p2 = (pmpkg_t *)k->data; + pmsyncpkg_t *sync = k->data; + if(!sync) { + continue; + } + + p2 = sync->pkg; + /* Ensure we aren't looking at current package */ if(p2 == p1) { continue; @@ -404,6 +411,7 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root) _alpm_log(PM_LOG_DEBUG, "file changed packages, adding to remove skiplist: %s", filestr); } } else { + _alpm_log(PM_LOG_DEBUG, "file found in conflict: %s", filestr); conflicts = add_fileconflict(conflicts, PM_CONFLICT_TYPE_FILE, filestr, p1->name, NULL); break; -- cgit v1.2.3-24-g4f1b