From bfa985827715dcc7fc1e99ce6499d00291c0a302 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 30 Nov 2009 11:20:23 +0100 Subject: [PATCH] xbps-bin, xbps-repo: show the "essential" and "replaces" objs values in the 'show' target. --HG-- extra : convert_revision : xtraeme%40gmail.com-20091130102023-3ureuzorr96fj7by --- bin/xbps-repo/util.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bin/xbps-repo/util.c b/bin/xbps-repo/util.c index a66fad39..3571ddee 100644 --- a/bin/xbps-repo/util.c +++ b/bin/xbps-repo/util.c @@ -107,6 +107,17 @@ show_pkg_info(prop_dictionary_t dict) if (obj && prop_object_type(obj) == PROP_TYPE_STRING) printf("Version: %s\n", prop_string_cstring_nocopy(obj)); + obj = prop_dictionary_get(dict, "essential"); + if (obj && prop_object_type(obj) == PROP_TYPE_BOOL) + printf("Essential: %s\n", prop_bool_true(obj) ? "yes" : "no"); + + obj = prop_dictionary_get(dict, "replaces"); + if (obj && prop_object_type(obj) == PROP_TYPE_ARRAY) { + printf("Replaces: "); + (void)xbps_callback_array_iter_in_dict(dict, "replaces", + list_strings_sep_in_array, NULL); + } + obj = prop_dictionary_get(dict, "conf_files"); if (obj && prop_object_type(obj) == PROP_TYPE_ARRAY) { printf("Configuration files:\n");