Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/conflict.c
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2007-11-18 10:29:55 +0100
committerDan McGee <dan@archlinux.org>2007-11-18 12:42:34 -0600
commit65fb99133df10143e07c237f04777e01b443c037 (patch)
tree8191e73f11366db75d4465f9f52f0e7ddc9fb04f /lib/libalpm/conflict.c
parent829a7b904dcb56aa17cd9279f29385dad2814793 (diff)
Simple s/conflict/fileconflict/ renaming.
The names related to conflicts are misleading : For dependencies conflicts, the type is pmdepmissing, and the function names contain just "conflict". For file conflicts, the type is pmconflict, and some functions contained just "conflict", some others "fileconflict". So this is the first step for improving the situation. Original idea/patch from Nagy, but the patch already didn't apply anymore, so I did it again. The main difference is that I kept the conflictype, with the following renaming : pmconflicttype_t -> pmfileconflicttype_t PM_CONFLICT_TYPE_TARGET -> PM_FILECONFLICT_TARGET PM_CONFLICT_TYPE_FILE -> PM_FILECONFLICT_FILESYSTEM Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Diffstat (limited to 'lib/libalpm/conflict.c')
-rw-r--r--lib/libalpm/conflict.c24
1 files changed, 12 insertions, 12 deletions
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;