From d37ad048732fbcef38aec001993553896dbe4198 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Sun, 15 Oct 2006 19:31:03 +0000 Subject: Merged frugalware changes (too many to list). Also added some config file handling changes (support [sections] to carry over to included files - this helps with backwards compatibility with existing pacman config files) --- lib/libalpm/conflict.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lib/libalpm/conflict.c') diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index 2e9cc050..8a11ca31 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -2,6 +2,9 @@ * conflict.c * * Copyright (c) 2002-2006 by Judd Vinet + * Copyright (c) 2005 by Aurelien Foret + * Copyright (c) 2006 by David Kimpe + * Copyright (c) 2006 by Miklos Vajna * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,6 +22,10 @@ * USA. */ +#if defined(__APPLE__) || defined(__OpenBSD__) +#include +#endif + #include "config.h" #include #include @@ -28,6 +35,7 @@ #include /* pacman */ #include "util.h" +#include "error.h" #include "log.h" #include "cache.h" #include "deps.h" @@ -148,7 +156,7 @@ PMList *_alpm_checkconflicts(pmdb_t *db, PMList *packages) for(j = packages; j; j = j->next) { pmpkg_t *pkg = j->data; if(!strcmp(pkg->name, info->name)) { - // Use the new, to-be-installed package's conflicts + /* Use the new, to-be-installed package's conflicts */ conflicts = pkg->conflicts; usenewconflicts = 1; } @@ -253,13 +261,6 @@ PMList *_alpm_db_find_conflicts(pmdb_t *db, PMList *targets, char *root, PMList } if(!lstat(path, &buf)) { int ok = 0; - if(!S_ISLNK(buf.st_mode) && ((isdir && !S_ISDIR(buf.st_mode)) || (!isdir && S_ISDIR(buf.st_mode)))) { - /* if the package target is a directory, and the filesystem target - * is not (or vice versa) then it's a conflict - */ - ok = 0; - goto donecheck; - } /* re-fetch with stat() instead of lstat() */ stat(path, &buf); if(S_ISDIR(buf.st_mode)) { @@ -328,7 +329,6 @@ PMList *_alpm_db_find_conflicts(pmdb_t *db, PMList *targets, char *root, PMList } } } -donecheck: if(!ok) { pmconflict_t *conflict = malloc(sizeof(pmconflict_t)); if(conflict == NULL) { -- cgit v1.2.3-54-g00ecf