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>
This commit is contained in:
parent
72f40b3876
commit
5c21f0f152
1 changed files with 6 additions and 2 deletions
|
@ -46,7 +46,7 @@ void dump_pkg_full(pmpkg_t *pkg, int level)
|
||||||
time_t bdate, idate;
|
time_t bdate, idate;
|
||||||
char bdatestr[50], idatestr[50];
|
char bdatestr[50], idatestr[50];
|
||||||
const alpm_list_t *i;
|
const alpm_list_t *i;
|
||||||
alpm_list_t *depstrings = NULL;
|
alpm_list_t *requiredby = NULL, *depstrings = NULL;
|
||||||
|
|
||||||
if(pkg == NULL) {
|
if(pkg == NULL) {
|
||||||
return;
|
return;
|
||||||
|
@ -76,6 +76,11 @@ void dump_pkg_full(pmpkg_t *pkg, int level)
|
||||||
depstrings = alpm_list_add(depstrings, alpm_dep_get_string(dep));
|
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 : ");
|
descheader = _("Description : ");
|
||||||
|
|
||||||
/* actual output */
|
/* actual output */
|
||||||
|
@ -89,7 +94,6 @@ void dump_pkg_full(pmpkg_t *pkg, int level)
|
||||||
list_display(_("Optional Deps :"), alpm_pkg_get_optdepends(pkg));
|
list_display(_("Optional Deps :"), alpm_pkg_get_optdepends(pkg));
|
||||||
/* Only applicable if installed */
|
/* Only applicable if installed */
|
||||||
if(level > 0) {
|
if(level > 0) {
|
||||||
alpm_list_t *requiredby = alpm_pkg_compute_requiredby(pkg);
|
|
||||||
list_display(_("Required By :"), requiredby);
|
list_display(_("Required By :"), requiredby);
|
||||||
FREELIST(requiredby);
|
FREELIST(requiredby);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue