summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/conflict.c
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-07-18 04:09:24 +0200
committerDan McGee <dan@archlinux.org>2012-08-02 16:40:44 +0200
commitd46bb6b27b05579acf5665368c111b4cc41eedcb (patch)
tree5e5f6e4b3d2d51fa7fdbea892f570f7f0ce800f4 /lib/libalpm/conflict.c
parent72d3713cc7865af5f4d91410ad56ed4287be6109 (diff)
downloadpacman-d46bb6b27b05579acf5665368c111b4cc41eedcb.tar.gz
pacman-d46bb6b27b05579acf5665368c111b4cc41eedcb.tar.xz
Split _alpm_filelist_operation function
To improve conflict checking, we will need to make these functions diverge to an extent where having two separate functions will be preferable. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/conflict.c')
-rw-r--r--lib/libalpm/conflict.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index dd153fed..ccfe990c 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -367,8 +367,8 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
for(j = i->next; j; j = j->next) {
alpm_list_t *common_files;
alpm_pkg_t *p2 = j->data;
- common_files = _alpm_filelist_operation(alpm_pkg_get_files(p1),
- alpm_pkg_get_files(p2), INTERSECT);
+ common_files = _alpm_filelist_intersection(alpm_pkg_get_files(p1),
+ alpm_pkg_get_files(p2));
if(common_files) {
alpm_list_t *k;
@@ -400,8 +400,8 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
if(dbpkg) {
alpm_list_t *difference;
/* older ver of package currently installed */
- difference = _alpm_filelist_operation(alpm_pkg_get_files(p1),
- alpm_pkg_get_files(dbpkg), DIFFERENCE);
+ difference = _alpm_filelist_difference(alpm_pkg_get_files(p1),
+ alpm_pkg_get_files(dbpkg));
tmpfiles.count = alpm_list_count(difference);
tmpfiles.files = alpm_list_to_array(difference, tmpfiles.count,
sizeof(alpm_file_t));
@@ -533,7 +533,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
if(handle->pm_errno == ALPM_ERR_MEMORY) {
FREELIST(conflicts);
if(dbpkg) {
- /* only freed if it was generated from filelist_operation() */
+ /* only freed if it was generated from _alpm_filelist_difference() */
free(tmpfiles.files);
}
return NULL;
@@ -541,7 +541,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
}
}
if(dbpkg) {
- /* only freed if it was generated from filelist_operation() */
+ /* only freed if it was generated from _alpm_filelist_difference() */
free(tmpfiles.files);
}
}