mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
Fix klibc conflict case.
A package can now replace symdir->dir by dir without fileconflicts. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
bfd6817112
commit
45f90de0eb
@ -531,6 +531,19 @@ alpm_list_t *_alpm_db_find_fileconflicts(pmdb_t *db, pmtrans_t *trans,
|
|||||||
free(dir);
|
free(dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!resolved_conflict && dbpkg) {
|
||||||
|
char *rpath = calloc(PATH_MAX+1, sizeof(char));
|
||||||
|
if(!realpath(path, rpath)) {
|
||||||
|
free(rpath);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
char *filestr = rpath + strlen(handle->root);
|
||||||
|
if(alpm_list_find_str(alpm_pkg_get_files(dbpkg),filestr)) {
|
||||||
|
resolved_conflict = 1;
|
||||||
|
}
|
||||||
|
free(rpath);
|
||||||
|
}
|
||||||
|
|
||||||
if(!resolved_conflict) {
|
if(!resolved_conflict) {
|
||||||
_alpm_log(PM_LOG_DEBUG, "file found in conflict: %s\n", path);
|
_alpm_log(PM_LOG_DEBUG, "file found in conflict: %s\n", path);
|
||||||
conflicts = add_fileconflict(conflicts, PM_FILECONFLICT_FILESYSTEM,
|
conflicts = add_fileconflict(conflicts, PM_FILECONFLICT_FILESYSTEM,
|
||||||
|
17
pactest/tests/fileconflict007.py
Normal file
17
pactest/tests/fileconflict007.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
self.description = "Fileconflict with symlinks (klibc case)"
|
||||||
|
|
||||||
|
lp = pmpkg("pkg")
|
||||||
|
lp.files = ["dir/realdir/",
|
||||||
|
"dir/symdir -> realdir",
|
||||||
|
"dir/realdir/file"]
|
||||||
|
self.addpkg2db("local", lp)
|
||||||
|
|
||||||
|
p = pmpkg("pkg", "1.0-2")
|
||||||
|
p.files = ["dir/symdir/file"]
|
||||||
|
self.addpkg(p)
|
||||||
|
|
||||||
|
self.args = "-U %s" % p.filename()
|
||||||
|
|
||||||
|
self.addrule("PACMAN_RETCODE=0")
|
||||||
|
self.addrule("PKG_EXIST=pkg")
|
||||||
|
self.addrule("PKG_VERSION=pkg|1.0-2")
|
Loading…
Reference in New Issue
Block a user