From 5c21f0f15281fda6e0515e83c2e37989752bbfab Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 29 Nov 2007 16:16:13 -0600 Subject: Move requiredby computation before any display starts This should reduce the chances of people thinking pacman hung during the middle of something. Signed-off-by: Dan McGee --- src/pacman/package.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pacman/package.c b/src/pacman/package.c index b9a323b7..7b10bf28 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -46,7 +46,7 @@ void dump_pkg_full(pmpkg_t *pkg, int level) time_t bdate, idate; char bdatestr[50], idatestr[50]; const alpm_list_t *i; - alpm_list_t *depstrings = NULL; + alpm_list_t *requiredby = NULL, *depstrings = NULL; if(pkg == NULL) { return; @@ -76,6 +76,11 @@ void dump_pkg_full(pmpkg_t *pkg, int level) depstrings = alpm_list_add(depstrings, alpm_dep_get_string(dep)); } + if(level>0) { + /* compute this here so we don't get a puase in the middle of output */ + requiredby = alpm_pkg_compute_requiredby(pkg); + } + descheader = _("Description : "); /* actual output */ @@ -89,7 +94,6 @@ void dump_pkg_full(pmpkg_t *pkg, int level) list_display(_("Optional Deps :"), alpm_pkg_get_optdepends(pkg)); /* Only applicable if installed */ if(level > 0) { - alpm_list_t *requiredby = alpm_pkg_compute_requiredby(pkg); list_display(_("Required By :"), requiredby); FREELIST(requiredby); } -- cgit v1.2.3-24-g4f1b