diff options
author | Chantry Xavier <shiningxc@gmail.com> | 2007-07-13 10:41:40 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-07-13 10:18:52 -0400 |
commit | 8d62835ba18a7fb662c2f3a23b86a16fe1386388 (patch) | |
tree | 953768bfcfdd1f91ba92047be150164a8cb266b4 | |
parent | 5ed501565ef8caf4fe2043066750ed7564a2c52d (diff) | |
download | pacman-8d62835ba18a7fb662c2f3a23b86a16fe1386388.tar.xz |
Remove conflict message for non-existent files (reworked)
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | lib/libalpm/conflict.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index 9ee89859..98f4d66e 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -431,8 +431,13 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root) snprintf(path, PATH_MAX, "%s%s", root, filestr); - /* stat the file - if it exists and is not a dir, do some checks */ - if(lstat(path, &buf) == 0 && !S_ISDIR(buf.st_mode)) { + /* stat the file - if it exists, do some checks */ + if(lstat(path, &buf) != 0) { + continue; + } + if(S_ISDIR(buf.st_mode)) { + _alpm_log(PM_LOG_DEBUG, "%s is a directory, not a conflict", path); + } else { _alpm_log(PM_LOG_DEBUG, "checking possible conflict: %s", path); /* Make sure the possible conflict is not a symlink that points to a @@ -496,9 +501,6 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root) conflicts = add_fileconflict(conflicts, PM_CONFLICT_TYPE_FILE, path, p1->name, NULL); } - } else { - if(S_ISDIR(buf.st_mode)) - _alpm_log(PM_LOG_DEBUG, "%s is a directory, not a conflict", path); } } alpm_list_free_inner(tmpfiles, &free); |