index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-07-14 15:32:03 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-07-14 15:34:04 -0500 |
commit | af357d6ab00d8ca258dfd7abb689d6fd2eb4090f (patch) | |
tree | 81218f7e003e71d2d8c7feee6671516865f751d6 /lib/libalpm/conflict.c | |
parent | 36e48573ceee0f707de0dcc55d1da442d949d3dc (diff) |
-rw-r--r-- | lib/libalpm/conflict.c | 16 |
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index 8cf16191..eda6ba10 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -549,6 +549,22 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, free(rpath); } + /* is the file unowned and in the backup list of the new package? */ + if(!resolved_conflict && _alpm_needbackup(filestr, p1)) { + alpm_list_t *local_pkgs = _alpm_db_get_pkgcache(handle->db_local); + int found = 0; + for(k = local_pkgs; k && !found; k = k->next) { + if(_alpm_filelist_contains(alpm_pkg_get_files(k->data), filestr)) { + found = 1; + } + } + if(!found) { + _alpm_log(handle, ALPM_LOG_DEBUG, + "file was unowned but in new backup list: %s\n", path); + resolved_conflict = 1; + } + } + if(!resolved_conflict) { conflicts = add_fileconflict(handle, conflicts, ALPM_FILECONFLICT_FILESYSTEM, path, p1->name, NULL); |