From 7b2942e789809898560b2b9630f1630547d2bdb1 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 13 Jun 2013 17:44:44 +0200 Subject: [PATCH] xbps-dgraph: only add revdeps when it's necessary. --- bin/xbps-dgraph/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/xbps-dgraph/main.c b/bin/xbps-dgraph/main.c index 6a2b40cb..8beff01a 100644 --- a/bin/xbps-dgraph/main.c +++ b/bin/xbps-dgraph/main.c @@ -422,7 +422,8 @@ create_dot_graph(struct xbps_handle *xhp, */ if (revdeps) { rdeps = xbps_pkgdb_get_pkg_revdeps(xhp, pkgver); - prop_dictionary_set(plistd, "requiredby", rdeps); + if (prop_array_count(rdeps)) + prop_dictionary_set(plistd, "requiredby", rdeps); } allkeys = prop_dictionary_all_keys(plistd); parse_array_in_pkg_dictionary(f, plistd, sub_confd, allkeys);