summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2013-02-12 13:00:53 +0100
committerAllan McRae <allan@archlinux.org>2013-02-24 04:11:54 +0100
commit34749e177db5d4aafdb9f3de630c7ab193a0f36d (patch)
tree93d21fc0a0c170589acf19617e15cd9d9d8949d1 /src
parent19754b34a36203266c4e02f29178084c77282efd (diff)
downloadpacman-34749e177db5d4aafdb9f3de630c7ab193a0f36d.tar.gz
pacman-34749e177db5d4aafdb9f3de630c7ab193a0f36d.tar.xz
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 <allan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/sync.c3
1 files changed, 3 insertions, 0 deletions
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) {