[pacman-dev] [PATCH v2 6/6] Make package info show optional requirements
Benedikt Morbach
benedikt.morbach at googlemail.com
Mon Jul 25 16:31:14 EDT 2011
Signed-off-by: Benedikt Morbach <benedikt.morbach at googlemail.com>
---
src/pacman/package.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/pacman/package.c b/src/pacman/package.c
index 6725bdc..fc404b9 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -53,7 +53,8 @@ void dump_pkg_full(alpm_pkg_t *pkg, enum pkg_from from, int extra)
const char *label;
double size;
const alpm_list_t *i;
- alpm_list_t *depstrings = NULL, *optstrings = NULL, *requiredby = NULL;
+ alpm_list_t *depstrings, *optstrings, *requiredby, *optrequiredby;
+ depstrings = optstrings = requiredby = optrequiredby = NULL;
if(pkg == NULL) {
return;
@@ -92,7 +93,8 @@ void dump_pkg_full(alpm_pkg_t *pkg, enum pkg_from from, int extra)
if(extra || from == PKG_FROM_LOCALDB) {
/* compute this here so we don't get a pause in the middle of output */
- requiredby = alpm_pkg_compute_requiredby(pkg, 0);
+ requiredby = alpm_pkg_compute_requiredby(pkg, 0);
+ optrequiredby = alpm_pkg_compute_requiredby(pkg, 1);
}
/* actual output */
@@ -110,6 +112,7 @@ void dump_pkg_full(alpm_pkg_t *pkg, enum pkg_from from, int extra)
list_display_linebreak(_("Optional Deps :"), optstrings);
if(extra || from == PKG_FROM_LOCALDB) {
list_display(_("Required By :"), requiredby);
+ list_display(_("Optional For :"), optrequiredby);
}
list_display(_("Conflicts With :"), alpm_pkg_get_conflicts(pkg));
list_display(_("Replaces :"), alpm_pkg_get_replaces(pkg));
--
1.7.6
More information about the pacman-dev
mailing list