summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2011-06-28 06:33:55 +0200
committerAllan McRae <allan@archlinux.org>2011-06-28 15:28:23 +0200
commit220842b37ba484a452f5e4d8071d91d3f2b6c2d4 (patch)
treea2ceee8059e1809996c4023c8ff31ad25552fb85
parent6d876f9b6be055d54e50d42a34c267aad64c0b21 (diff)
downloadpacman-220842b37ba484a452f5e4d8071d91d3f2b6c2d4.tar.gz
pacman-220842b37ba484a452f5e4d8071d91d3f2b6c2d4.tar.xz
Rename pmconflict_t to alpm_conflict_t
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--lib/libalpm/alpm.h4
-rw-r--r--lib/libalpm/conflict.c22
-rw-r--r--lib/libalpm/conflict.h4
-rw-r--r--lib/libalpm/sync.c8
-rw-r--r--src/pacman/sync.c2
-rw-r--r--src/pacman/upgrade.c2
-rw-r--r--src/util/testdb.c2
7 files changed, 22 insertions, 22 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 53ff4a9f..ff966f18 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -122,11 +122,11 @@ typedef struct _alpm_depmissing_t {
} alpm_depmissing_t;
/** Conflict */
-typedef struct _pmconflict_t {
+typedef struct _alpm_conflict_t {
char *package1;
char *package2;
char *reason;
-} pmconflict_t;
+} alpm_conflict_t;
/** File conflict */
typedef struct _pmfileconflict_t {
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index 1e535122..83a1fa5f 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -40,12 +40,12 @@
#include "log.h"
#include "deps.h"
-static pmconflict_t *conflict_new(const char *package1, const char *package2,
+static alpm_conflict_t *conflict_new(const char *package1, const char *package2,
const char *reason)
{
- pmconflict_t *conflict;
+ alpm_conflict_t *conflict;
- MALLOC(conflict, sizeof(pmconflict_t), return NULL);
+ MALLOC(conflict, sizeof(alpm_conflict_t), return NULL);
STRDUP(conflict->package1, package1, return NULL);
STRDUP(conflict->package2, package2, return NULL);
@@ -54,7 +54,7 @@ static pmconflict_t *conflict_new(const char *package1, const char *package2,
return conflict;
}
-void _alpm_conflict_free(pmconflict_t *conflict)
+void _alpm_conflict_free(alpm_conflict_t *conflict)
{
FREE(conflict->package2);
FREE(conflict->package1);
@@ -62,10 +62,10 @@ void _alpm_conflict_free(pmconflict_t *conflict)
FREE(conflict);
}
-pmconflict_t *_alpm_conflict_dup(const pmconflict_t *conflict)
+alpm_conflict_t *_alpm_conflict_dup(const alpm_conflict_t *conflict)
{
- pmconflict_t *newconflict;
- CALLOC(newconflict, 1, sizeof(pmconflict_t), );
+ alpm_conflict_t *newconflict;
+ CALLOC(newconflict, 1, sizeof(alpm_conflict_t), );
STRDUP(newconflict->package1, conflict->package1, return NULL);
STRDUP(newconflict->package2, conflict->package2, return NULL);
@@ -74,14 +74,14 @@ pmconflict_t *_alpm_conflict_dup(const pmconflict_t *conflict)
return newconflict;
}
-static int conflict_isin(pmconflict_t *needle, alpm_list_t *haystack)
+static int conflict_isin(alpm_conflict_t *needle, alpm_list_t *haystack)
{
alpm_list_t *i;
const char *npkg1 = needle->package1;
const char *npkg2 = needle->package2;
for(i = haystack; i; i = i->next) {
- pmconflict_t *conflict = i->data;
+ alpm_conflict_t *conflict = i->data;
const char *cpkg1 = conflict->package1;
const char *cpkg2 = conflict->package2;
if((strcmp(cpkg1, npkg1) == 0 && strcmp(cpkg2, npkg2) == 0)
@@ -103,7 +103,7 @@ static int conflict_isin(pmconflict_t *needle, alpm_list_t *haystack)
static int add_conflict(alpm_handle_t *handle, alpm_list_t **baddeps,
const char *pkg1, const char *pkg2, const char *reason)
{
- pmconflict_t *conflict = conflict_new(pkg1, pkg2, reason);
+ alpm_conflict_t *conflict = conflict_new(pkg1, pkg2, reason);
if(!conflict) {
return -1;
}
@@ -209,7 +209,7 @@ alpm_list_t *_alpm_outerconflicts(alpm_db_t *db, alpm_list_t *packages)
*
* @param handle the context handle
* @param pkglist the list of packages to check
- * @return an alpm_list_t of pmconflict_t
+ * @return an alpm_list_t of alpm_conflict_t
*/
alpm_list_t SYMEXPORT *alpm_checkconflicts(alpm_handle_t *handle,
alpm_list_t *pkglist)
diff --git a/lib/libalpm/conflict.h b/lib/libalpm/conflict.h
index 83266959..4edbe620 100644
--- a/lib/libalpm/conflict.h
+++ b/lib/libalpm/conflict.h
@@ -24,8 +24,8 @@
#include "db.h"
#include "package.h"
-pmconflict_t *_alpm_conflict_dup(const pmconflict_t *conflict);
-void _alpm_conflict_free(pmconflict_t *conflict);
+alpm_conflict_t *_alpm_conflict_dup(const alpm_conflict_t *conflict);
+void _alpm_conflict_free(alpm_conflict_t *conflict);
alpm_list_t *_alpm_innerconflicts(alpm_handle_t *handle, alpm_list_t *packages);
alpm_list_t *_alpm_outerconflicts(alpm_db_t *db, alpm_list_t *packages);
alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index e3dda23d..954253d9 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -405,7 +405,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
deps = _alpm_innerconflicts(handle, trans->add);
for(i = deps; i; i = i->next) {
- pmconflict_t *conflict = i->data;
+ alpm_conflict_t *conflict = i->data;
alpm_pkg_t *rsync, *sync, *sync1, *sync2;
/* have we already removed one of the conflicting targets? */
@@ -432,7 +432,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
handle->pm_errno = PM_ERR_CONFLICTING_DEPS;
ret = -1;
if(data) {
- pmconflict_t *newconflict = _alpm_conflict_dup(conflict);
+ alpm_conflict_t *newconflict = _alpm_conflict_dup(conflict);
if(newconflict) {
*data = alpm_list_add(*data, newconflict);
}
@@ -464,7 +464,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
deps = _alpm_outerconflicts(handle->db_local, trans->add);
for(i = deps; i; i = i->next) {
- pmconflict_t *conflict = i->data;
+ alpm_conflict_t *conflict = i->data;
/* if conflict->package2 (the local package) is not elected for removal,
we ask the user */
@@ -496,7 +496,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
handle->pm_errno = PM_ERR_CONFLICTING_DEPS;
ret = -1;
if(data) {
- pmconflict_t *newconflict = _alpm_conflict_dup(conflict);
+ alpm_conflict_t *newconflict = _alpm_conflict_dup(conflict);
if(newconflict) {
*data = alpm_list_add(*data, newconflict);
}
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 659396cd..f0d7dba8 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -783,7 +783,7 @@ static int sync_trans(alpm_list_t *targets)
break;
case PM_ERR_CONFLICTING_DEPS:
for(i = data; i; i = alpm_list_next(i)) {
- pmconflict_t *conflict = alpm_list_getdata(i);
+ alpm_conflict_t *conflict = alpm_list_getdata(i);
/* only print reason if it contains new information */
if(strcmp(conflict->package1, conflict->reason) == 0 ||
strcmp(conflict->package2, conflict->reason) == 0) {
diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c
index 67860277..1fa538da 100644
--- a/src/pacman/upgrade.c
+++ b/src/pacman/upgrade.c
@@ -118,7 +118,7 @@ int pacman_upgrade(alpm_list_t *targets)
break;
case PM_ERR_CONFLICTING_DEPS:
for(i = data; i; i = alpm_list_next(i)) {
- pmconflict_t *conflict = alpm_list_getdata(i);
+ alpm_conflict_t *conflict = alpm_list_getdata(i);
if(strcmp(conflict->package1, conflict->reason) == 0 ||
strcmp(conflict->package2, conflict->reason) == 0) {
printf(_(":: %s and %s are in conflict\n"),
diff --git a/src/util/testdb.c b/src/util/testdb.c
index fff43a22..38067911 100644
--- a/src/util/testdb.c
+++ b/src/util/testdb.c
@@ -118,7 +118,7 @@ static int checkconflicts(alpm_list_t *pkglist)
/* check conflicts */
data = alpm_checkconflicts(handle, pkglist);
for(i = data; i; i = i->next) {
- pmconflict_t *conflict = alpm_list_getdata(i);
+ alpm_conflict_t *conflict = alpm_list_getdata(i);
printf("%s conflicts with %s\n",
conflict->package1, conflict->package2);
ret++;