Signed-off-by: Benedikt Morbach <[email protected]>
---
 src/pacman/package.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/pacman/package.c b/src/pacman/package.c
index b8b34c3..8578d69 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -66,8 +66,8 @@ static void optdeplist_display(const char *title,
 
 /**
  * Display the details of a package.
- * Extra information entails 'required by' info for sync packages and backup
- * files info for local packages.
+ * Extra information entails 'required by' and 'optrequired by' info
+ * for sync packages and backup files info for local packages.
  * @param pkg package to display information for
  * @param from the type of package we are dealing with
  * @param extra should we show extra information
@@ -80,6 +80,7 @@ void dump_pkg_full(alpm_pkg_t *pkg, int extra)
        const char *label;
        double size;
        alpm_list_t *requiredby = NULL;
+       alpm_list_t *optrequiredby = NULL;
        alpm_pkgfrom_t from;
 
        from = alpm_pkg_get_origin(pkg);
@@ -108,7 +109,8 @@ void dump_pkg_full(alpm_pkg_t *pkg, 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 */
@@ -126,6 +128,7 @@ void dump_pkg_full(alpm_pkg_t *pkg, int extra)
        optdeplist_display(_("Optional Deps  :"), alpm_pkg_get_optdepends(pkg));
        if(extra || from == PKG_FROM_LOCALDB) {
                list_display(_("Required By    :"), requiredby);
+               list_display(_("Optional For   :"), optrequiredby);
        }
        deplist_display(_("Conflicts With :"), alpm_pkg_get_conflicts(pkg));
        deplist_display(_("Replaces       :"), alpm_pkg_get_replaces(pkg));
-- 
1.7.6.1


Reply via email to