summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/alpm.h7
-rw-r--r--lib/libalpm/conflict.c8
2 files changed, 8 insertions, 7 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index ccbdd1c6..2277a69c 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -405,10 +405,9 @@ typedef enum _alpm_question_t {
ALPM_QUESTION_REPLACE_PKG = (1 << 1),
ALPM_QUESTION_CONFLICT_PKG = (1 << 2),
ALPM_QUESTION_CORRUPTED_PKG = (1 << 3),
- ALPM_QUESTION_LOCAL_NEWER = (1 << 4),
- ALPM_QUESTION_REMOVE_PKGS = (1 << 5),
- ALPM_QUESTION_SELECT_PROVIDER = (1 << 6),
- ALPM_QUESTION_IMPORT_KEY = (1 << 7)
+ ALPM_QUESTION_REMOVE_PKGS = (1 << 4),
+ ALPM_QUESTION_SELECT_PROVIDER = (1 << 5),
+ ALPM_QUESTION_IMPORT_KEY = (1 << 6)
} alpm_question_t;
/** Question callback */
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index 18e29a89..041a04ef 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -556,11 +556,13 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
/* Look at all the targets to see if file has changed hands */
for(k = upgrade; k && !resolved_conflict; k = k->next) {
- alpm_pkg_t *p2 = k->data;
- if(!p2 || strcmp(p1->name, p2->name) == 0) {
+ alpm_pkg_t *localp2, *p2 = k->data;
+ if(!p2 || p1 == p2) {
+ /* skip p1; both p1 and p2 come directly from the upgrade list
+ * so they can be compared directly */
continue;
}
- alpm_pkg_t *localp2 = _alpm_db_get_pkgfromcache(handle->db_local, p2->name);
+ localp2 = _alpm_db_get_pkgfromcache(handle->db_local, p2->name);
/* localp2->files will be removed (target conflicts are handled by CHECK 1) */
_alpm_filelist_resolve(handle, alpm_pkg_get_files(localp2));