From 4857012be7c5970bd2fe1c7aed37fb2e1071a802 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Tue, 17 Jan 2006 21:19:40 +0000 Subject: code cleanup --- src/pacman/sync.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/pacman/sync.c') 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; @@ -542,6 +544,8 @@ int pacman_sync(list_t *targets) alpm_dep_getinfo(miss, PM_DEP_NAME)); } 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) { -- cgit v1.2.3