summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/add.c2
-rw-r--r--lib/libalpm/alpm.h18
-rw-r--r--lib/libalpm/conflict.c24
-rw-r--r--lib/libalpm/conflict.h6
-rw-r--r--lib/libalpm/remove.c2
5 files changed, 26 insertions, 26 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index f6bab199..fbdf4ea4 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -221,7 +221,7 @@ int _alpm_add_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
EVENT(trans, PM_TRANS_EVT_FILECONFLICTS_START, NULL, NULL);
_alpm_log(PM_LOG_DEBUG, "looking for file conflicts\n");
- lp = _alpm_db_find_conflicts(db, trans, handle->root);
+ lp = _alpm_db_find_fileconflicts(db, trans, handle->root);
if(lp != NULL) {
if(data) {
*data = lp;
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index e8726bcc..a28c912a 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -52,7 +52,7 @@ typedef struct __pmtrans_t pmtrans_t;
typedef struct __pmsyncpkg_t pmsyncpkg_t;
typedef struct __pmdepend_t pmdepend_t;
typedef struct __pmdepmissing_t pmdepmissing_t;
-typedef struct __pmconflict_t pmconflict_t;
+typedef struct __pmfileconflict_t pmfileconflict_t;
typedef struct __pmgraph_t pmgraph_t;
/*
@@ -390,15 +390,15 @@ char *alpm_dep_get_string(const pmdepend_t *dep);
* File conflicts
*/
-typedef enum _pmconflicttype_t {
- PM_CONFLICT_TYPE_TARGET = 1,
- PM_CONFLICT_TYPE_FILE
-} pmconflicttype_t;
+typedef enum _pmfileconflicttype_t {
+ PM_FILECONFLICT_TARGET = 1,
+ PM_FILECONFLICT_FILESYSTEM
+} pmfileconflicttype_t;
-const char *alpm_conflict_get_target(pmconflict_t *conflict);
-pmconflicttype_t alpm_conflict_get_type(pmconflict_t *conflict);
-const char *alpm_conflict_get_file(pmconflict_t *conflict);
-const char *alpm_conflict_get_ctarget(pmconflict_t *conflict);
+const char *alpm_fileconflict_get_target(pmfileconflict_t *conflict);
+pmfileconflicttype_t alpm_fileconflict_get_type(pmfileconflict_t *conflict);
+const char *alpm_fileconflict_get_file(pmfileconflict_t *conflict);
+const char *alpm_fileconflict_get_ctarget(pmfileconflict_t *conflict);
/*
* Helpers
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index 91fd794d..d72dd97a 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -230,17 +230,17 @@ static alpm_list_t *chk_filedifference(alpm_list_t *filesA, alpm_list_t *filesB)
return(ret);
}
-/* Adds pmconflict_t to a conflicts list. Pass the conflicts list, type (either
- * PM_CONFLICT_TYPE_TARGET or PM_CONFLICT_TYPE_FILE), a file string, and either
+/* Adds pmfileconflict_t to a conflicts list. Pass the conflicts list, type (either
+ * PM_FILECONFLICT_TARGET or PM_FILECONFLICT_FILESYSTEM), a file string, and either
* two package names or one package name and NULL. This is a wrapper for former
* functionality that was done inline.
*/
static alpm_list_t *add_fileconflict(alpm_list_t *conflicts,
- pmconflicttype_t type, const char *filestr,
+ pmfileconflicttype_t type, const char *filestr,
const char* name1, const char* name2)
{
- pmconflict_t *conflict;
- MALLOC(conflict, sizeof(pmconflict_t), return(conflicts));
+ pmfileconflict_t *conflict;
+ MALLOC(conflict, sizeof(pmfileconflict_t), return(conflicts));
conflict->type = type;
strncpy(conflict->target, name1, PKG_NAME_LEN);
@@ -261,7 +261,7 @@ static alpm_list_t *add_fileconflict(alpm_list_t *conflicts,
/* Find file conflicts that may occur during the transaction with two checks:
* 1: check every target against every target
* 2: check every target against the filesystem */
-alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root)
+alpm_list_t *_alpm_db_find_fileconflicts(pmdb_t *db, pmtrans_t *trans, char *root)
{
alpm_list_t *i, *conflicts = NULL;
alpm_list_t *targets = trans->packages;
@@ -304,7 +304,7 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root)
if(tmpfiles) {
for(k = tmpfiles; k; k = k->next) {
snprintf(path, PATH_MAX, "%s%s", root, (char *)k->data);
- conflicts = add_fileconflict(conflicts, PM_CONFLICT_TYPE_TARGET, path,
+ conflicts = add_fileconflict(conflicts, PM_FILECONFLICT_TARGET, path,
alpm_pkg_get_name(p1), alpm_pkg_get_name(p2));
}
FREELIST(tmpfiles);
@@ -407,7 +407,7 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root)
}
if(!resolved_conflict) {
_alpm_log(PM_LOG_DEBUG, "file found in conflict: %s\n", path);
- conflicts = add_fileconflict(conflicts, PM_CONFLICT_TYPE_FILE,
+ conflicts = add_fileconflict(conflicts, PM_FILECONFLICT_FILESYSTEM,
path, p1->name, NULL);
}
}
@@ -418,7 +418,7 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root)
return(conflicts);
}
-const char SYMEXPORT *alpm_conflict_get_target(pmconflict_t *conflict)
+const char SYMEXPORT *alpm_fileconflict_get_target(pmfileconflict_t *conflict)
{
ALPM_LOG_FUNC;
@@ -429,7 +429,7 @@ const char SYMEXPORT *alpm_conflict_get_target(pmconflict_t *conflict)
return conflict->target;
}
-pmconflicttype_t SYMEXPORT alpm_conflict_get_type(pmconflict_t *conflict)
+pmfileconflicttype_t SYMEXPORT alpm_fileconflict_get_type(pmfileconflict_t *conflict)
{
ALPM_LOG_FUNC;
@@ -440,7 +440,7 @@ pmconflicttype_t SYMEXPORT alpm_conflict_get_type(pmconflict_t *conflict)
return conflict->type;
}
-const char SYMEXPORT *alpm_conflict_get_file(pmconflict_t *conflict)
+const char SYMEXPORT *alpm_fileconflict_get_file(pmfileconflict_t *conflict)
{
ALPM_LOG_FUNC;
@@ -451,7 +451,7 @@ const char SYMEXPORT *alpm_conflict_get_file(pmconflict_t *conflict)
return conflict->file;
}
-const char SYMEXPORT *alpm_conflict_get_ctarget(pmconflict_t *conflict)
+const char SYMEXPORT *alpm_fileconflict_get_ctarget(pmfileconflict_t *conflict)
{
ALPM_LOG_FUNC;
diff --git a/lib/libalpm/conflict.h b/lib/libalpm/conflict.h
index c4f1d600..f8aebbf1 100644
--- a/lib/libalpm/conflict.h
+++ b/lib/libalpm/conflict.h
@@ -27,15 +27,15 @@
#define CONFLICT_FILE_LEN 512
-struct __pmconflict_t {
+struct __pmfileconflict_t {
char target[PKG_NAME_LEN];
- pmconflicttype_t type;
+ pmfileconflicttype_t type;
char file[CONFLICT_FILE_LEN];
char ctarget[PKG_NAME_LEN];
};
alpm_list_t *_alpm_checkconflicts(pmdb_t *db, alpm_list_t *packages);
-alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root);
+alpm_list_t *_alpm_db_find_fileconflicts(pmdb_t *db, pmtrans_t *trans, char *root);
#endif /* _ALPM_CONFLICT_H */
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index 018216fe..592cf39e 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -219,7 +219,7 @@ static void unlink_file(pmpkg_t *info, alpm_list_t *lp, pmtrans_t *trans)
}
} else {
/* check the remove skip list before removing the file.
- * see the big comment block in db_find_conflicts() for an
+ * see the big comment block in db_find_fileconflicts() for an
* explanation. */
if(alpm_list_find_str(trans->skip_remove, file)) {
_alpm_log(PM_LOG_DEBUG, "%s is in trans->skip_remove, skipping removal\n",