From 34749e177db5d4aafdb9f3de630c7ab193a0f36d Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 12 Feb 2013 22:00:53 +1000 Subject: Perform limited conflict checking with --force Pacman currently bails when trying to extract a file over a directory when using --force. Instead of ignoring all conflict, perform the check and skip any file-file conflicts. Conflicts between directories and files are still flagged and cause the transation to abort. As a bonus, we now know about files changing packages when using --force, so we can skip removing them fixing upgrade046. Signed-off-by: Allan McRae --- src/pacman/sync.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 417773dc..924cdf50 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -881,6 +881,9 @@ int sync_prepare_execute(void) alpm_strerror(err)); switch(err) { case ALPM_ERR_FILE_CONFLICTS: + if(config->flags & ALPM_TRANS_FLAG_FORCE) { + printf(_("unable to %s directory-file conflicts\n"), "--force"); + } for(i = data; i; i = alpm_list_next(i)) { alpm_fileconflict_t *conflict = i->data; switch(conflict->type) { -- cgit v1.2.3-24-g4f1b