summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2011-06-28 06:29:55 +0200
committerAllan McRae <allan@archlinux.org>2011-06-28 15:28:23 +0200
commit9540dfc4d9cc70266a425cc334f78d7805b2340b (patch)
tree6df03b8ce8be5108721b1c8549ef28eb95897885 /lib
parent6b62508c865feaa35d000fa0bcd0ccd8321cd742 (diff)
downloadpacman-9540dfc4d9cc70266a425cc334f78d7805b2340b.tar.gz
pacman-9540dfc4d9cc70266a425cc334f78d7805b2340b.tar.xz
Rename pmdepend_t to alpm_depend_t
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/alpm.h12
-rw-r--r--lib/libalpm/be_local.c2
-rw-r--r--lib/libalpm/be_package.c2
-rw-r--r--lib/libalpm/conflict.c2
-rw-r--r--lib/libalpm/deps.c42
-rw-r--r--lib/libalpm/deps.h8
-rw-r--r--lib/libalpm/sync.c4
7 files changed, 36 insertions, 36 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 16a30a41..c23fa4d3 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -106,17 +106,17 @@ typedef struct __alpm_pkg_t alpm_pkg_t;
typedef struct __alpm_trans_t alpm_trans_t;
/** Dependency */
-typedef struct _pmdepend_t {
+typedef struct _alpm_depend_t {
char *name;
char *version;
unsigned long name_hash;
alpm_depmod_t mod;
-} pmdepend_t;
+} alpm_depend_t;
/** Missing dependency */
typedef struct _pmdepmissing_t {
char *target;
- pmdepend_t *depend;
+ alpm_depend_t *depend;
/* this is used in case of remove dependency error only */
char *causingpkg;
} pmdepmissing_t;
@@ -581,9 +581,9 @@ alpm_list_t *alpm_pkg_get_licenses(alpm_pkg_t *pkg);
*/
alpm_list_t *alpm_pkg_get_groups(alpm_pkg_t *pkg);
-/** Returns the list of package dependencies as pmdepend_t.
+/** Returns the list of package dependencies as alpm_depend_t.
* @param pkg a pointer to package
- * @return a reference to an internal list of pmdepend_t structures.
+ * @return a reference to an internal list of alpm_depend_t structures.
*/
alpm_list_t *alpm_pkg_get_depends(alpm_pkg_t *pkg);
@@ -967,7 +967,7 @@ alpm_list_t *alpm_checkconflicts(alpm_handle_t *handle, alpm_list_t *pkglist);
* @param dep a dependency info structure
* @return a formatted string, e.g. "glibc>=2.12"
*/
-char *alpm_dep_compute_string(const pmdepend_t *dep);
+char *alpm_dep_compute_string(const alpm_depend_t *dep);
/** @} */
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index f59f74fe..06a948c1 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -639,7 +639,7 @@ int _alpm_local_db_read(alpm_db_t *db, alpm_pkg_t *info, pmdbinfrq_t inforeq)
}
} else if(strcmp(line, "%DEPENDS%") == 0) {
while(fgets(line, sizeof(line), fp) && strlen(_alpm_strtrim(line))) {
- pmdepend_t *dep = _alpm_splitdep(line);
+ alpm_depend_t *dep = _alpm_splitdep(line);
info->depends = alpm_list_add(info->depends, dep);
}
} else if(strcmp(line, "%OPTDEPENDS%") == 0) {
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index 4433d31c..a372526d 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -189,7 +189,7 @@ static int parse_descfile(alpm_handle_t *handle, struct archive *a, alpm_pkg_t *
/* size in the raw package is uncompressed (installed) size */
newpkg->isize = atol(ptr);
} else if(strcmp(key, "depend") == 0) {
- pmdepend_t *dep = _alpm_splitdep(ptr);
+ alpm_depend_t *dep = _alpm_splitdep(ptr);
newpkg->depends = alpm_list_add(newpkg->depends, dep);
} else if(strcmp(key, "optdepend") == 0) {
newpkg->optdepends = alpm_list_add(newpkg->optdepends, strdup(ptr));
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index 8a626be6..1e535122 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -145,7 +145,7 @@ static void check_conflict(alpm_handle_t *handle,
for(j = alpm_pkg_get_conflicts(pkg1); j; j = j->next) {
const char *conflict = j->data;
alpm_list_t *k;
- pmdepend_t *parsed_conflict = _alpm_splitdep(conflict);
+ alpm_depend_t *parsed_conflict = _alpm_splitdep(conflict);
for(k = list2; k; k = k->next) {
alpm_pkg_t *pkg2 = k->data;
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index 914d1a3a..93a7821e 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -37,14 +37,14 @@
#include "handle.h"
#include "trans.h"
-void _alpm_dep_free(pmdepend_t *dep)
+void _alpm_dep_free(alpm_depend_t *dep)
{
FREE(dep->name);
FREE(dep->version);
FREE(dep);
}
-static pmdepmissing_t *depmiss_new(const char *target, pmdepend_t *dep,
+static pmdepmissing_t *depmiss_new(const char *target, alpm_depend_t *dep,
const char *causingpkg)
{
pmdepmissing_t *miss;
@@ -208,10 +208,10 @@ static int no_dep_version(alpm_handle_t *handle)
return flags != -1 && (flags & PM_TRANS_FLAG_NODEPVERSION);
}
-static pmdepend_t *filtered_depend(pmdepend_t *dep, int nodepversion)
+static alpm_depend_t *filtered_depend(alpm_depend_t *dep, int nodepversion)
{
if(nodepversion) {
- pmdepend_t *newdep = _alpm_dep_dup(dep);
+ alpm_depend_t *newdep = _alpm_dep_dup(dep);
ASSERT(newdep, return dep);
newdep->mod = PM_DEP_MOD_ANY;
dep = newdep;
@@ -219,14 +219,14 @@ static pmdepend_t *filtered_depend(pmdepend_t *dep, int nodepversion)
return dep;
}
-static void release_filtered_depend(pmdepend_t *dep, int nodepversion)
+static void release_filtered_depend(alpm_depend_t *dep, int nodepversion)
{
if(nodepversion) {
free(dep);
}
}
-static alpm_pkg_t *find_dep_satisfier(alpm_list_t *pkgs, pmdepend_t *dep)
+static alpm_pkg_t *find_dep_satisfier(alpm_list_t *pkgs, alpm_depend_t *dep)
{
alpm_list_t *i;
@@ -247,7 +247,7 @@ static alpm_pkg_t *find_dep_satisfier(alpm_list_t *pkgs, pmdepend_t *dep)
*/
alpm_pkg_t SYMEXPORT *alpm_find_satisfier(alpm_list_t *pkgs, const char *depstring)
{
- pmdepend_t *dep = _alpm_splitdep(depstring);
+ alpm_depend_t *dep = _alpm_splitdep(depstring);
if(!dep) {
return NULL;
}
@@ -295,7 +295,7 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_handle_t *handle, alpm_list_t *pkglis
alpm_pkg_get_name(tp), alpm_pkg_get_version(tp));
for(j = alpm_pkg_get_depends(tp); j; j = j->next) {
- pmdepend_t *depend = j->data;
+ alpm_depend_t *depend = j->data;
depend = filtered_depend(depend, nodepversion);
/* 1. we check the upgrade list */
/* 2. we check database for untouched satisfying packages */
@@ -320,7 +320,7 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_handle_t *handle, alpm_list_t *pkglis
for(i = dblist; i; i = i->next) {
alpm_pkg_t *lp = i->data;
for(j = alpm_pkg_get_depends(lp); j; j = j->next) {
- pmdepend_t *depend = j->data;
+ alpm_depend_t *depend = j->data;
depend = filtered_depend(depend, nodepversion);
alpm_pkg_t *causingpkg = find_dep_satisfier(modified, depend);
/* we won't break this depend, if it is already broken, we ignore it */
@@ -369,7 +369,7 @@ static int dep_vercmp(const char *version1, alpm_depmod_t mod,
return equal;
}
-int _alpm_depcmp(alpm_pkg_t *pkg, pmdepend_t *dep)
+int _alpm_depcmp(alpm_pkg_t *pkg, alpm_depend_t *dep)
{
alpm_list_t *i;
int satisfy = 0;
@@ -411,16 +411,16 @@ int _alpm_depcmp(alpm_pkg_t *pkg, pmdepend_t *dep)
return satisfy;
}
-pmdepend_t *_alpm_splitdep(const char *depstring)
+alpm_depend_t *_alpm_splitdep(const char *depstring)
{
- pmdepend_t *depend;
+ alpm_depend_t *depend;
const char *ptr, *version = NULL;
if(depstring == NULL) {
return NULL;
}
- CALLOC(depend, 1, sizeof(pmdepend_t), return NULL);
+ CALLOC(depend, 1, sizeof(alpm_depend_t), return NULL);
/* Find a version comparator if one exists. If it does, set the type and
* increment the ptr accordingly so we can copy the right strings. */
@@ -455,10 +455,10 @@ pmdepend_t *_alpm_splitdep(const char *depstring)
return depend;
}
-pmdepend_t *_alpm_dep_dup(const pmdepend_t *dep)
+alpm_depend_t *_alpm_dep_dup(const alpm_depend_t *dep)
{
- pmdepend_t *newdep;
- CALLOC(newdep, 1, sizeof(pmdepend_t), return NULL);
+ alpm_depend_t *newdep;
+ CALLOC(newdep, 1, sizeof(alpm_depend_t), return NULL);
STRDUP(newdep->name, dep->name, return NULL);
newdep->name_hash = dep->name_hash;
@@ -554,7 +554,7 @@ void _alpm_recursedeps(alpm_db_t *db, alpm_list_t *targs, int include_explicit)
* an error code without prompting
* @return the resolved package
**/
-static alpm_pkg_t *resolvedep(alpm_handle_t *handle, pmdepend_t *dep,
+static alpm_pkg_t *resolvedep(alpm_handle_t *handle, alpm_depend_t *dep,
alpm_list_t *dbs, alpm_list_t *excluding, int prompt)
{
alpm_list_t *i, *j;
@@ -656,7 +656,7 @@ static alpm_pkg_t *resolvedep(alpm_handle_t *handle, pmdepend_t *dep,
alpm_pkg_t SYMEXPORT *alpm_find_dbs_satisfier(alpm_handle_t *handle,
alpm_list_t *dbs, const char *depstring)
{
- pmdepend_t *dep;
+ alpm_depend_t *dep;
alpm_pkg_t *pkg;
CHECK_HANDLE(handle, return NULL);
@@ -719,7 +719,7 @@ int _alpm_resolvedeps(alpm_handle_t *handle, alpm_list_t *localpkgs, alpm_pkg_t
for(j = deps; j; j = j->next) {
pmdepmissing_t *miss = j->data;
- pmdepend_t *missdep = miss->depend;
+ alpm_depend_t *missdep = miss->depend;
/* check if one of the packages in the [*packages] list already satisfies
* this dependency */
if(find_dep_satisfier(*packages, missdep)) {
@@ -764,12 +764,12 @@ int _alpm_resolvedeps(alpm_handle_t *handle, alpm_list_t *localpkgs, alpm_pkg_t
return ret;
}
-/** Reverse of splitdep; make a dep string from a pmdepend_t struct.
+/** Reverse of splitdep; make a dep string from a alpm_depend_t struct.
* The string must be freed!
* @param dep the depend to turn into a string
* @return a string-formatted dependency with operator if necessary
*/
-char SYMEXPORT *alpm_dep_compute_string(const pmdepend_t *dep)
+char SYMEXPORT *alpm_dep_compute_string(const alpm_depend_t *dep)
{
const char *name, *opr, *ver;
char *str;
diff --git a/lib/libalpm/deps.h b/lib/libalpm/deps.h
index 438c803a..8935175d 100644
--- a/lib/libalpm/deps.h
+++ b/lib/libalpm/deps.h
@@ -27,16 +27,16 @@
#include "package.h"
#include "alpm.h"
-void _alpm_dep_free(pmdepend_t *dep);
-pmdepend_t *_alpm_dep_dup(const pmdepend_t *dep);
+void _alpm_dep_free(alpm_depend_t *dep);
+alpm_depend_t *_alpm_dep_dup(const alpm_depend_t *dep);
void _alpm_depmiss_free(pmdepmissing_t *miss);
alpm_list_t *_alpm_sortbydeps(alpm_handle_t *handle, alpm_list_t *targets, int reverse);
void _alpm_recursedeps(alpm_db_t *db, alpm_list_t *targs, int include_explicit);
int _alpm_resolvedeps(alpm_handle_t *handle, alpm_list_t *localpkgs, alpm_pkg_t *pkg,
alpm_list_t *preferred, alpm_list_t **packages, alpm_list_t *remove,
alpm_list_t **data);
-pmdepend_t *_alpm_splitdep(const char *depstring);
-int _alpm_depcmp(alpm_pkg_t *pkg, pmdepend_t *dep);
+alpm_depend_t *_alpm_splitdep(const char *depstring);
+int _alpm_depcmp(alpm_pkg_t *pkg, alpm_depend_t *dep);
#endif /* _ALPM_DEPS_H */
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index f447c067..e3dda23d 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -419,8 +419,8 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
conflict->package1, conflict->package2);
/* if sync1 provides sync2, we remove sync2 from the targets, and vice versa */
- pmdepend_t *dep1 = _alpm_splitdep(conflict->package1);
- pmdepend_t *dep2 = _alpm_splitdep(conflict->package2);
+ alpm_depend_t *dep1 = _alpm_splitdep(conflict->package1);
+ alpm_depend_t *dep2 = _alpm_splitdep(conflict->package2);
if(_alpm_depcmp(sync1, dep2)) {
rsync = sync2;
sync = sync1;