summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-03-29 20:32:10 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-03-29 20:32:10 +0000
commitd16c8be8a05a0b7fc9e1146d63bd13b5e3718fba (patch)
treed7a582faa74f9206dbab5107d30b68cf997d8fbf /src
parent95ea99e1973c03abe73b7c20ded9a24905420291 (diff)
downloadpacman-d16c8be8a05a0b7fc9e1146d63bd13b5e3718fba.tar.xz
turned pmdepmissing_t into an opaque structure
Diffstat (limited to 'src')
-rw-r--r--src/pacman/add.c17
-rw-r--r--src/pacman/pacman.c18
-rw-r--r--src/pacman/remove.c4
-rw-r--r--src/pacman/sync.c4
4 files changed, 22 insertions, 21 deletions
diff --git a/src/pacman/add.c b/src/pacman/add.c
index b3bc05ad..0cff3937 100644
--- a/src/pacman/add.c
+++ b/src/pacman/add.c
@@ -83,13 +83,14 @@ int pacman_add(list_t *targets)
switch(pm_errno) {
case PM_ERR_UNSATISFIED_DEPS:
for(i = alpm_list_first(data); i; i = alpm_list_next(i)) {
- pmdepmissing_t *miss = alpm_list_getdata(i);
+ PM_DEPMISS *miss = alpm_list_getdata(i);
- MSG(NL, ":: %s: requires %s", miss->target, miss->depend.name);
- switch(miss->depend.mod) {
- case PM_DEP_EQ: MSG(CL, "=%s", miss->depend.version); break;
- case PM_DEP_GE: MSG(CL, ">=%s", miss->depend.version); break;
- case PM_DEP_LE: MSG(CL, "<=%s", miss->depend.version); break;
+ MSG(NL, ":: %s: requires %s", alpm_dep_getinfo(miss, PM_DEP_TARGET),
+ alpm_dep_getinfo(miss, PM_DEP_NAME));
+ switch((int)alpm_dep_getinfo(miss, PM_DEP_MOD)) {
+ case PM_DEP_MOD_EQ: MSG(CL, "=%s", alpm_dep_getinfo(miss, PM_DEP_VERSION)); break;
+ case PM_DEP_MOD_GE: MSG(CL, ">=%s", alpm_dep_getinfo(miss, PM_DEP_VERSION)); break;
+ case PM_DEP_MOD_LE: MSG(CL, "<=%s", alpm_dep_getinfo(miss, PM_DEP_VERSION)); break;
}
MSG(CL, "\n");
}
@@ -97,10 +98,10 @@ int pacman_add(list_t *targets)
break;
case PM_ERR_CONFLICTING_DEPS:
for(i = alpm_list_first(data); i; i = alpm_list_next(i)) {
- pmdepmissing_t *miss = alpm_list_getdata(i);
+ PM_DEPMISS *miss = alpm_list_getdata(i);
MSG(NL, ":: %s: conflicts with %s",
- miss->target, miss->depend.name, miss->depend.name);
+ alpm_dep_getinfo(miss, PM_DEP_TARGET), alpm_dep_getinfo(miss, PM_DEP_NAME));
}
alpm_list_free(data);
break;
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 2c610e23..730d9207 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -283,25 +283,25 @@ int pacman_deptest(list_t *targets)
switch(pm_errno) {
case PM_ERR_UNSATISFIED_DEPS:
for(lp = alpm_list_first(data); lp; lp = alpm_list_next(lp)) {
- pmdepmissing_t *miss = alpm_list_getdata(lp);
+ PM_DEPMISS *miss = alpm_list_getdata(lp);
if(!pmo_d_resolve) {
- MSG(NL, "requires: %s", miss->depend.name);
- switch(miss->depend.mod) {
- case PM_DEP_EQ: MSG(CL, "=%s", miss->depend.version); break;
- case PM_DEP_GE: MSG(CL, ">=%s", miss->depend.version); break;
- case PM_DEP_LE: MSG(CL, "<=%s", miss->depend.version); break;
+ MSG(NL, "requires: %s", alpm_dep_getinfo(miss, PM_DEP_NAME));
+ switch((int)alpm_dep_getinfo(miss, PM_DEP_MOD)) {
+ case PM_DEP_MOD_EQ: MSG(CL, "=%s", alpm_dep_getinfo(miss, PM_DEP_VERSION)); break;
+ case PM_DEP_MOD_GE: MSG(CL, ">=%s", alpm_dep_getinfo(miss, PM_DEP_VERSION)); break;
+ case PM_DEP_MOD_LE: MSG(CL, "<=%s", alpm_dep_getinfo(miss, PM_DEP_VERSION)); break;
}
MSG(CL, "\n");
}
- synctargs = list_add(synctargs, strdup(miss->depend.name));
+ synctargs = list_add(synctargs, alpm_dep_getinfo(miss, PM_DEP_NAME));
}
alpm_list_free(data);
break;
case PM_ERR_CONFLICTING_DEPS:
/* we can't auto-resolve conflicts */
for(lp = alpm_list_first(data); lp; lp = alpm_list_next(lp)) {
- pmdepmissing_t *miss = alpm_list_getdata(lp);
- MSG(NL, "conflict: %s", miss->depend.name);
+ PM_DEPMISS *miss = alpm_list_getdata(lp);
+ MSG(NL, "conflict: %s", alpm_dep_getinfo(miss, PM_DEP_NAME));
}
ret = 127;
alpm_list_free(data);
diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index 4da11898..3a91a87f 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -93,8 +93,8 @@ int pacman_remove(list_t *targets)
switch(pm_errno) {
case PM_ERR_UNSATISFIED_DEPS:
for(i = alpm_list_first(data); i; i = alpm_list_next(i)) {
- pmdepmissing_t *miss = alpm_list_getdata(i);
- MSG(NL, " %s: is required by %s\n", miss->target, miss->depend.name);
+ PM_DEPMISS *miss = alpm_list_getdata(i);
+ MSG(NL, " %s: is required by %s\n", alpm_dep_getinfo(miss, PM_DEP_TARGET), alpm_dep_getinfo(miss, PM_DEP_NAME));
}
alpm_list_free(data);
break;
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 631d58ff..f16c3656 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -425,8 +425,8 @@ int pacman_sync(list_t *targets)
if(pm_errno == PM_ERR_UNRESOLVABLE_DEPS) {
ERR(NL, "cannot resolve dependencies\n");
for(lp = alpm_list_first(data); lp; lp = alpm_list_next(lp)) {
- pmdepmissing_t *miss = alpm_list_getdata(lp);
- ERR(NL, " %s: \"%s\" is not in the package set\n", miss->target, miss->depend.name);
+ PM_DEPMISS *miss = alpm_list_getdata(lp);
+ ERR(NL, " %s: \"%s\" is not in the package set\n", alpm_dep_getinfo(miss, PM_DEP_TARGET), alpm_dep_getinfo(miss, PM_DEP_NAME));
}
alpm_list_free(data);
} else {