summaryrefslogtreecommitdiff
path: root/src/pacman
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-01-17 21:19:40 +0000
committerAurelien Foret <aurelien@archlinux.org>2006-01-17 21:19:40 +0000
commit4857012be7c5970bd2fe1c7aed37fb2e1071a802 (patch)
treeb10f97619639e07245b93a77ea0a4c5b2ad4fc3d /src/pacman
parent510d57b5774b80b9aa89c28a2ad1bc77304d0f38 (diff)
code cleanup
Diffstat (limited to 'src/pacman')
-rw-r--r--src/pacman/add.c2
-rw-r--r--src/pacman/remove.c3
-rw-r--r--src/pacman/sync.c13
3 files changed, 12 insertions, 6 deletions
diff --git a/src/pacman/add.c b/src/pacman/add.c
index aa65a139..70ff1abd 100644
--- a/src/pacman/add.c
+++ b/src/pacman/add.c
@@ -108,7 +108,7 @@ int pacman_add(list_t *targets)
break;
case PM_ERR_FILE_CONFLICTS:
for(i = alpm_list_first(data); i; i = alpm_list_next(i)) {
- MSG(NL, ":: %s\n", (char *)alpm_list_getdata(i));
+ MSG(NL, ":: %s", (char *)alpm_list_getdata(i));
}
alpm_list_free(data);
MSG(NL, "\nerrors occurred, no packages were upgraded.\n");
diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index 11dc2f8d..495a7253 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -96,7 +96,8 @@ int pacman_remove(list_t *targets)
case PM_ERR_UNSATISFIED_DEPS:
for(lp = alpm_list_first(data); lp; lp = alpm_list_next(lp)) {
PM_DEPMISS *miss = alpm_list_getdata(lp);
- MSG(NL, " %s: is required by %s\n", alpm_dep_getinfo(miss, PM_DEP_TARGET), alpm_dep_getinfo(miss, PM_DEP_NAME));
+ 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 c6a8fa3d..6e8ba5c8 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -515,7 +515,8 @@ int pacman_sync(list_t *targets)
}
}
- /* Step 2: "compute" the transaction based on targets and flags */
+ /* Step 2: "compute" the transaction based on targets and flags
+ */
if(alpm_trans_prepare(&data) == -1) {
ERR(NL, "failed to prepare transaction (%s)\n", alpm_strerror(pm_errno));
switch(pm_errno) {
@@ -523,8 +524,9 @@ int pacman_sync(list_t *targets)
for(lp = alpm_list_first(data); lp; lp = alpm_list_next(lp)) {
PM_DEPMISS *miss = alpm_list_getdata(lp);
- MSG(NL, ":: %s: requires %s", alpm_dep_getinfo(miss, PM_DEP_TARGET),
- alpm_dep_getinfo(miss, PM_DEP_NAME));
+ MSG(NL, ":: %s: %s %s", alpm_dep_getinfo(miss, PM_DEP_TARGET),
+ alpm_dep_getinfo(miss, PM_DEP_TYPE) == PM_DEP_TYPE_DEPEND ? "requires" : "is required by",
+ 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;
@@ -543,6 +545,8 @@ int pacman_sync(list_t *targets)
}
alpm_list_free(data);
break;
+ alpm_list_free(data);
+ break;
default:
break;
}
@@ -753,7 +757,8 @@ int pacman_sync(list_t *targets)
goto cleanup;
}
- /* Step 3: actually perform the installation */
+ /* Step 3: actually perform the installation
+ */
if(alpm_trans_commit(&data) == -1) {
ERR(NL, "failed to commit transaction (%s)\n", alpm_strerror(pm_errno));
switch(pm_errno) {