From 9dffb92fd9e74a90cd6dda1904f25aab84c9b13d Mon Sep 17 00:00:00 2001 From: Xavier Chantry Date: Mon, 16 Jun 2008 10:30:49 +0200 Subject: [PATCH] Print optdepends on install. Signed-off-by: Xavier Chantry --- src/pacman/sync.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 47ab4eb..62f2a1e 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -750,6 +750,23 @@ static int sync_trans(alpm_list_t *targets) goto cleanup; } + alpm_list_t *i; + for(i = packages; i; i = alpm_list_next(i)) { + alpm_list_t *d; + pmsyncpkg_t *sync = alpm_list_getdata(i); + pmpkg_t *pkg = alpm_sync_get_pkg(sync); + alpm_list_t *optdeps = alpm_pkg_get_optdepends(pkg); + printf("Optional dependencies for %s\n", alpm_pkg_get_name(pkg)); + if(!optdeps) { + continue; + } + for(d = alpm_pkg_get_optdepends(pkg); d; d = d->next) { + char *optdep = d->data; + printf("%s\n", optdep); + } + } + + /* Step 4: release transaction resources */ cleanup: if(data) { -- 1.5.5.3