diff options
author | Dan McGee <dan@archlinux.org> | 2007-11-29 16:16:13 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-11-29 16:16:13 -0600 |
commit | 5c21f0f15281fda6e0515e83c2e37989752bbfab (patch) | |
tree | 0539e25253db2ca1c954ac8a64961fd1ee1e60f7 /src | |
parent | 72f40b3876263f7a8dcda1390026f43f599f8823 (diff) |
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 <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/pacman/package.c | 8 |
1 files 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); } |