From eaf1a2d804e87716f02e3e7d086c48765e8caf9a Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 21 Mar 2024 22:44:32 +0100 Subject: [PATCH] Resolve user request for digraph --- cli/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cli/main.c b/cli/main.c index 815bde0..e51991b 100644 --- a/cli/main.c +++ b/cli/main.c @@ -303,7 +303,10 @@ apply_digraph(pkgconf_client_t *client, pkgconf_pkg_t *world, void *data, int ma PKGCONF_FOREACH_LIST_ENTRY(list->head, iter) { pkgconf_queue_t *pkgq = iter->data; - printf("\"user:request\" -> \"%s\" [fontname=Sans fontsize=8]\n", pkgq->package); + pkgconf_pkg_t *pkg = pkgconf_pkg_find(client, pkgq->package); + printf("\"user:request\" -> \"%s\" [fontname=Sans fontsize=8]\n", pkg == NULL ? pkgq->package : pkg->id); + if (pkg != NULL) + pkgconf_pkg_unref(client, pkg); } eflag = pkgconf_pkg_traverse(client, world, print_digraph_node, &last_seen, maxdepth, 0);