Rename pmdepmissing_t to alpm_depmissing_t
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
9540dfc4d9
commit
6d876f9b6b
8 changed files with 19 additions and 19 deletions
|
@ -114,12 +114,12 @@ typedef struct _alpm_depend_t {
|
|||
} alpm_depend_t;
|
||||
|
||||
/** Missing dependency */
|
||||
typedef struct _pmdepmissing_t {
|
||||
typedef struct _alpm_depmissing_t {
|
||||
char *target;
|
||||
alpm_depend_t *depend;
|
||||
/* this is used in case of remove dependency error only */
|
||||
char *causingpkg;
|
||||
} pmdepmissing_t;
|
||||
} alpm_depmissing_t;
|
||||
|
||||
/** Conflict */
|
||||
typedef struct _pmconflict_t {
|
||||
|
@ -895,7 +895,7 @@ int alpm_trans_init(alpm_handle_t *handle, pmtransflag_t flags,
|
|||
/** Prepare a transaction.
|
||||
* @param handle the context handle
|
||||
* @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)
|
||||
*/
|
||||
int alpm_trans_prepare(alpm_handle_t *handle, alpm_list_t **data);
|
||||
|
|
|
@ -44,12 +44,12 @@ void _alpm_dep_free(alpm_depend_t *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)
|
||||
{
|
||||
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);
|
||||
miss->depend = _alpm_dep_dup(dep);
|
||||
|
@ -58,7 +58,7 @@ static pmdepmissing_t *depmiss_new(const char *target, alpm_depend_t *dep,
|
|||
return miss;
|
||||
}
|
||||
|
||||
void _alpm_depmiss_free(pmdepmissing_t *miss)
|
||||
void _alpm_depmiss_free(alpm_depmissing_t *miss)
|
||||
{
|
||||
_alpm_dep_free(miss->depend);
|
||||
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 upgrade an alpm_list_t* of packages to be upgraded (remove-then-upgrade)
|
||||
* @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 *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) &&
|
||||
!find_dep_satisfier(dblist, depend)) {
|
||||
/* Unsatisfied dependency in the upgrade list */
|
||||
pmdepmissing_t *miss;
|
||||
alpm_depmissing_t *miss;
|
||||
char *missdepstring = alpm_dep_compute_string(depend);
|
||||
_alpm_log(handle, PM_LOG_DEBUG, "checkdeps: missing dependency '%s' for package '%s'\n",
|
||||
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 &&
|
||||
!find_dep_satisfier(upgrade, depend) &&
|
||||
!find_dep_satisfier(dblist, depend)) {
|
||||
pmdepmissing_t *miss;
|
||||
alpm_depmissing_t *miss;
|
||||
char *missdepstring = alpm_dep_compute_string(depend);
|
||||
_alpm_log(handle, PM_LOG_DEBUG, "checkdeps: transaction would break '%s' dependency of '%s'\n",
|
||||
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);
|
||||
|
||||
for(j = deps; j; j = j->next) {
|
||||
pmdepmissing_t *miss = j->data;
|
||||
alpm_depmissing_t *miss = j->data;
|
||||
alpm_depend_t *missdep = miss->depend;
|
||||
/* check if one of the packages in the [*packages] list already satisfies
|
||||
* this dependency */
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
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);
|
||||
void _alpm_depmiss_free(alpm_depmissing_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,
|
||||
|
|
|
@ -77,7 +77,7 @@ static void remove_prepare_cascade(alpm_handle_t *handle, alpm_list_t *lp)
|
|||
while(lp) {
|
||||
alpm_list_t *i;
|
||||
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);
|
||||
if(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) {
|
||||
alpm_list_t *i;
|
||||
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;
|
||||
alpm_pkg_t *pkg = _alpm_pkg_find(trans->remove, miss->causingpkg);
|
||||
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.
|
||||
* 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.
|
||||
* @param handle the context handle
|
||||
* @param data a pointer to an alpm_list_t* to fill
|
||||
|
|
|
@ -114,7 +114,7 @@ int pacman_remove(alpm_list_t *targets)
|
|||
break;
|
||||
case PM_ERR_UNSATISFIED_DEPS:
|
||||
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);
|
||||
printf(_(":: %s: requires %s\n"), miss->target, depstring);
|
||||
free(depstring);
|
||||
|
|
|
@ -775,7 +775,7 @@ static int sync_trans(alpm_list_t *targets)
|
|||
break;
|
||||
case PM_ERR_UNSATISFIED_DEPS:
|
||||
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);
|
||||
printf(_(":: %s: requires %s\n"), miss->target, depstring);
|
||||
free(depstring);
|
||||
|
|
|
@ -106,7 +106,7 @@ int pacman_upgrade(alpm_list_t *targets)
|
|||
break;
|
||||
case PM_ERR_UNSATISFIED_DEPS:
|
||||
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);
|
||||
|
||||
/* TODO indicate if the error was a virtual package or not:
|
||||
|
|
|
@ -100,7 +100,7 @@ static int checkdeps(alpm_list_t *pkglist)
|
|||
/* check dependencies */
|
||||
data = alpm_checkdeps(handle, pkglist, NULL, pkglist, 0);
|
||||
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);
|
||||
printf("missing dependency for %s : %s\n", miss->target,
|
||||
depstring);
|
||||
|
|
Loading…
Add table
Reference in a new issue