conflict.c: do not ignore symlink<->dir conflicts
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
5cfa4ec47e
commit
aa7e42db11
@ -514,17 +514,10 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
|
||||
_alpm_log(handle, ALPM_LOG_DEBUG, "checking possible conflict: %s\n", path);
|
||||
|
||||
if(filestr[strlen(filestr) - 1] == '/') {
|
||||
struct stat sbuf;
|
||||
if(S_ISDIR(lsbuf.st_mode)) {
|
||||
_alpm_log(handle, ALPM_LOG_DEBUG, "file is a directory, not a conflict\n");
|
||||
continue;
|
||||
}
|
||||
stat(path, &sbuf);
|
||||
if(S_ISLNK(lsbuf.st_mode) && S_ISDIR(sbuf.st_mode)) {
|
||||
_alpm_log(handle, ALPM_LOG_DEBUG,
|
||||
"file is a symlink to a dir, hopefully not a conflict\n");
|
||||
continue;
|
||||
}
|
||||
/* if we made it to here, we want all subsequent path comparisons to
|
||||
* not include the trailing slash. This allows things like file ->
|
||||
* directory replacements. */
|
||||
|
@ -25,5 +25,3 @@
|
||||
self.addrule("!PKG_EXIST=pkg2")
|
||||
self.addrule("FILE_EXIST=dir/realdir/realfile")
|
||||
self.addrule("!FILE_EXIST=dir/realdir/file")
|
||||
|
||||
self.expectfailure = True
|
||||
|
@ -16,3 +16,5 @@
|
||||
self.addrule("PKG_EXIST=pkg")
|
||||
self.addrule("PKG_VERSION=pkg|1.0-2")
|
||||
self.addrule("FILE_TYPE=dir/symdir/|dir")
|
||||
|
||||
self.expectfailure = True
|
||||
|
@ -22,5 +22,3 @@
|
||||
self.addrule("PACMAN_RETCODE=1")
|
||||
self.addrule("!PKG_EXIST=pkg1")
|
||||
self.addrule("!PKG_EXIST=pkg2")
|
||||
|
||||
self.expectfailure = True
|
||||
|
@ -24,5 +24,3 @@
|
||||
self.addrule("PACMAN_RETCODE=1")
|
||||
self.addrule("!PKG_EXIST=pkg1")
|
||||
self.addrule("!PKG_EXIST=pkg2")
|
||||
|
||||
self.expectfailure = True
|
||||
|
@ -16,5 +16,3 @@
|
||||
self.addrule("PACMAN_RETCODE=1")
|
||||
self.addrule("!PKG_EXIST=foo")
|
||||
self.addrule("!PKG_EXIST=bar")
|
||||
|
||||
self.expectfailure = True
|
||||
|
@ -17,5 +17,3 @@
|
||||
self.addrule("!FILE_EXIST=dir/realdir/tmp")
|
||||
self.addrule("FILE_TYPE=dir/symdir|link")
|
||||
self.addrule("FILE_TYPE=dir/realdir|dir")
|
||||
|
||||
self.expectfailure = True
|
||||
|
@ -19,3 +19,5 @@
|
||||
self.addrule("PKG_VERSION=pkg1|1.0-2")
|
||||
self.addrule("PKG_EXIST=pkg2")
|
||||
self.addrule("FILE_TYPE=lib|dir")
|
||||
|
||||
self.expectfailure = True
|
||||
|
Loading…
Reference in New Issue
Block a user