Rename pmdepmissing_t to alpm_depmissing_t

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2011-06-28 14:32:09 +10:00
parent 9540dfc4d9
commit 6d876f9b6b
8 changed files with 19 additions and 19 deletions

View file

@ -114,12 +114,12 @@ typedef struct _alpm_depend_t {
} alpm_depend_t; } alpm_depend_t;
/** Missing dependency */ /** Missing dependency */
typedef struct _pmdepmissing_t { typedef struct _alpm_depmissing_t {
char *target; char *target;
alpm_depend_t *depend; alpm_depend_t *depend;
/* this is used in case of remove dependency error only */ /* this is used in case of remove dependency error only */
char *causingpkg; char *causingpkg;
} pmdepmissing_t; } alpm_depmissing_t;
/** Conflict */ /** Conflict */
typedef struct _pmconflict_t { typedef struct _pmconflict_t {
@ -895,7 +895,7 @@ int alpm_trans_init(alpm_handle_t *handle, pmtransflag_t flags,
/** Prepare a transaction. /** Prepare a transaction.
* @param handle the context handle * @param handle the context handle
* @param data the address of an alpm_list where a list * @param data the address of an alpm_list where a list
* of pmdepmissing_t objects is dumped (conflicting packages) * of alpm_depmissing_t objects is dumped (conflicting packages)
* @return 0 on success, -1 on error (pm_errno is set accordingly) * @return 0 on success, -1 on error (pm_errno is set accordingly)
*/ */
int alpm_trans_prepare(alpm_handle_t *handle, alpm_list_t **data); int alpm_trans_prepare(alpm_handle_t *handle, alpm_list_t **data);

View file

@ -44,12 +44,12 @@ void _alpm_dep_free(alpm_depend_t *dep)
FREE(dep); FREE(dep);
} }
static pmdepmissing_t *depmiss_new(const char *target, alpm_depend_t *dep, static alpm_depmissing_t *depmiss_new(const char *target, alpm_depend_t *dep,
const char *causingpkg) const char *causingpkg)
{ {
pmdepmissing_t *miss; alpm_depmissing_t *miss;
MALLOC(miss, sizeof(pmdepmissing_t), return NULL); MALLOC(miss, sizeof(alpm_depmissing_t), return NULL);
STRDUP(miss->target, target, return NULL); STRDUP(miss->target, target, return NULL);
miss->depend = _alpm_dep_dup(dep); miss->depend = _alpm_dep_dup(dep);
@ -58,7 +58,7 @@ static pmdepmissing_t *depmiss_new(const char *target, alpm_depend_t *dep,
return miss; return miss;
} }
void _alpm_depmiss_free(pmdepmissing_t *miss) void _alpm_depmiss_free(alpm_depmissing_t *miss)
{ {
_alpm_dep_free(miss->depend); _alpm_dep_free(miss->depend);
FREE(miss->target); FREE(miss->target);
@ -263,7 +263,7 @@ alpm_pkg_t SYMEXPORT *alpm_find_satisfier(alpm_list_t *pkgs, const char *depstri
* @param remove an alpm_list_t* of packages to be removed * @param remove an alpm_list_t* of packages to be removed
* @param upgrade an alpm_list_t* of packages to be upgraded (remove-then-upgrade) * @param upgrade an alpm_list_t* of packages to be upgraded (remove-then-upgrade)
* @param reversedeps handles the backward dependencies * @param reversedeps handles the backward dependencies
* @return an alpm_list_t* of pmdepmissing_t pointers. * @return an alpm_list_t* of alpm_depmissing_t pointers.
*/ */
alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_handle_t *handle, alpm_list_t *pkglist, alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_handle_t *handle, alpm_list_t *pkglist,
alpm_list_t *remove, alpm_list_t *upgrade, int reversedeps) alpm_list_t *remove, alpm_list_t *upgrade, int reversedeps)
@ -302,7 +302,7 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_handle_t *handle, alpm_list_t *pkglis
if(!find_dep_satisfier(upgrade, depend) && if(!find_dep_satisfier(upgrade, depend) &&
!find_dep_satisfier(dblist, depend)) { !find_dep_satisfier(dblist, depend)) {
/* Unsatisfied dependency in the upgrade list */ /* Unsatisfied dependency in the upgrade list */
pmdepmissing_t *miss; alpm_depmissing_t *miss;
char *missdepstring = alpm_dep_compute_string(depend); char *missdepstring = alpm_dep_compute_string(depend);
_alpm_log(handle, PM_LOG_DEBUG, "checkdeps: missing dependency '%s' for package '%s'\n", _alpm_log(handle, PM_LOG_DEBUG, "checkdeps: missing dependency '%s' for package '%s'\n",
missdepstring, alpm_pkg_get_name(tp)); missdepstring, alpm_pkg_get_name(tp));
@ -329,7 +329,7 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_handle_t *handle, alpm_list_t *pkglis
if(causingpkg && if(causingpkg &&
!find_dep_satisfier(upgrade, depend) && !find_dep_satisfier(upgrade, depend) &&
!find_dep_satisfier(dblist, depend)) { !find_dep_satisfier(dblist, depend)) {
pmdepmissing_t *miss; alpm_depmissing_t *miss;
char *missdepstring = alpm_dep_compute_string(depend); char *missdepstring = alpm_dep_compute_string(depend);
_alpm_log(handle, PM_LOG_DEBUG, "checkdeps: transaction would break '%s' dependency of '%s'\n", _alpm_log(handle, PM_LOG_DEBUG, "checkdeps: transaction would break '%s' dependency of '%s'\n",
missdepstring, alpm_pkg_get_name(lp)); missdepstring, alpm_pkg_get_name(lp));
@ -718,7 +718,7 @@ int _alpm_resolvedeps(alpm_handle_t *handle, alpm_list_t *localpkgs, alpm_pkg_t
alpm_list_free(targ); alpm_list_free(targ);
for(j = deps; j; j = j->next) { for(j = deps; j; j = j->next) {
pmdepmissing_t *miss = j->data; alpm_depmissing_t *miss = j->data;
alpm_depend_t *missdep = miss->depend; alpm_depend_t *missdep = miss->depend;
/* check if one of the packages in the [*packages] list already satisfies /* check if one of the packages in the [*packages] list already satisfies
* this dependency */ * this dependency */

View file

@ -29,7 +29,7 @@
void _alpm_dep_free(alpm_depend_t *dep); void _alpm_dep_free(alpm_depend_t *dep);
alpm_depend_t *_alpm_dep_dup(const alpm_depend_t *dep); alpm_depend_t *_alpm_dep_dup(const alpm_depend_t *dep);
void _alpm_depmiss_free(pmdepmissing_t *miss); void _alpm_depmiss_free(alpm_depmissing_t *miss);
alpm_list_t *_alpm_sortbydeps(alpm_handle_t *handle, alpm_list_t *targets, int reverse); 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); 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, int _alpm_resolvedeps(alpm_handle_t *handle, alpm_list_t *localpkgs, alpm_pkg_t *pkg,

View file

@ -77,7 +77,7 @@ static void remove_prepare_cascade(alpm_handle_t *handle, alpm_list_t *lp)
while(lp) { while(lp) {
alpm_list_t *i; alpm_list_t *i;
for(i = lp; i; i = i->next) { for(i = lp; i; i = i->next) {
pmdepmissing_t *miss = (pmdepmissing_t *)i->data; alpm_depmissing_t *miss = (alpm_depmissing_t *)i->data;
alpm_pkg_t *info = _alpm_db_get_pkgfromcache(handle->db_local, miss->target); alpm_pkg_t *info = _alpm_db_get_pkgfromcache(handle->db_local, miss->target);
if(info) { if(info) {
if(!_alpm_pkg_find(trans->remove, alpm_pkg_get_name(info))) { if(!_alpm_pkg_find(trans->remove, alpm_pkg_get_name(info))) {
@ -105,7 +105,7 @@ static void remove_prepare_keep_needed(alpm_handle_t *handle, alpm_list_t *lp)
while(lp != NULL) { while(lp != NULL) {
alpm_list_t *i; alpm_list_t *i;
for(i = lp; i; i = i->next) { for(i = lp; i; i = i->next) {
pmdepmissing_t *miss = (pmdepmissing_t *)i->data; alpm_depmissing_t *miss = (alpm_depmissing_t *)i->data;
void *vpkg; void *vpkg;
alpm_pkg_t *pkg = _alpm_pkg_find(trans->remove, miss->causingpkg); alpm_pkg_t *pkg = _alpm_pkg_find(trans->remove, miss->causingpkg);
if(pkg == NULL) { if(pkg == NULL) {
@ -129,7 +129,7 @@ static void remove_prepare_keep_needed(alpm_handle_t *handle, alpm_list_t *lp)
/** Transaction preparation for remove actions. /** Transaction preparation for remove actions.
* This functions takes a pointer to a alpm_list_t which will be * This functions takes a pointer to a alpm_list_t which will be
* filled with a list of pmdepmissing_t* objects representing * filled with a list of alpm_depmissing_t* objects representing
* the packages blocking the transaction. * the packages blocking the transaction.
* @param handle the context handle * @param handle the context handle
* @param data a pointer to an alpm_list_t* to fill * @param data a pointer to an alpm_list_t* to fill

View file

@ -114,7 +114,7 @@ int pacman_remove(alpm_list_t *targets)
break; break;
case PM_ERR_UNSATISFIED_DEPS: case PM_ERR_UNSATISFIED_DEPS:
for(i = data; i; i = alpm_list_next(i)) { for(i = data; i; i = alpm_list_next(i)) {
pmdepmissing_t *miss = alpm_list_getdata(i); alpm_depmissing_t *miss = alpm_list_getdata(i);
char *depstring = alpm_dep_compute_string(miss->depend); char *depstring = alpm_dep_compute_string(miss->depend);
printf(_(":: %s: requires %s\n"), miss->target, depstring); printf(_(":: %s: requires %s\n"), miss->target, depstring);
free(depstring); free(depstring);

View file

@ -775,7 +775,7 @@ static int sync_trans(alpm_list_t *targets)
break; break;
case PM_ERR_UNSATISFIED_DEPS: case PM_ERR_UNSATISFIED_DEPS:
for(i = data; i; i = alpm_list_next(i)) { for(i = data; i; i = alpm_list_next(i)) {
pmdepmissing_t *miss = alpm_list_getdata(i); alpm_depmissing_t *miss = alpm_list_getdata(i);
char *depstring = alpm_dep_compute_string(miss->depend); char *depstring = alpm_dep_compute_string(miss->depend);
printf(_(":: %s: requires %s\n"), miss->target, depstring); printf(_(":: %s: requires %s\n"), miss->target, depstring);
free(depstring); free(depstring);

View file

@ -106,7 +106,7 @@ int pacman_upgrade(alpm_list_t *targets)
break; break;
case PM_ERR_UNSATISFIED_DEPS: case PM_ERR_UNSATISFIED_DEPS:
for(i = data; i; i = alpm_list_next(i)) { for(i = data; i; i = alpm_list_next(i)) {
pmdepmissing_t *miss = alpm_list_getdata(i); alpm_depmissing_t *miss = alpm_list_getdata(i);
char *depstring = alpm_dep_compute_string(miss->depend); char *depstring = alpm_dep_compute_string(miss->depend);
/* TODO indicate if the error was a virtual package or not: /* TODO indicate if the error was a virtual package or not:

View file

@ -100,7 +100,7 @@ static int checkdeps(alpm_list_t *pkglist)
/* check dependencies */ /* check dependencies */
data = alpm_checkdeps(handle, pkglist, NULL, pkglist, 0); data = alpm_checkdeps(handle, pkglist, NULL, pkglist, 0);
for(i = data; i; i = alpm_list_next(i)) { for(i = data; i; i = alpm_list_next(i)) {
pmdepmissing_t *miss = alpm_list_getdata(i); alpm_depmissing_t *miss = alpm_list_getdata(i);
char *depstring = alpm_dep_compute_string(miss->depend); char *depstring = alpm_dep_compute_string(miss->depend);
printf("missing dependency for %s : %s\n", miss->target, printf("missing dependency for %s : %s\n", miss->target,
depstring); depstring);