diff --git a/libpkgconf/queue.c b/libpkgconf/queue.c index b1b44f0..1ef8c07 100644 --- a/libpkgconf/queue.c +++ b/libpkgconf/queue.c @@ -116,22 +116,26 @@ pkgconf_queue_collect_dependents(pkgconf_client_t *client, pkgconf_pkg_t *pkg, v if (pkg == world) return; - PKGCONF_FOREACH_LIST_ENTRY(pkg->required.head, node) - { - pkgconf_dependency_t *flattened_dep; + if ((pkg->flags & PKGCONF_PKG_PROPF_STATIC) == PKGCONF_PKG_PROPF_STATIC) { + PKGCONF_FOREACH_LIST_ENTRY(pkg->requires_private.head, node) + { + pkgconf_dependency_t *flattened_dep; - flattened_dep = pkgconf_dependency_copy(client, node->data); + flattened_dep = pkgconf_dependency_copy(client, node->data); - pkgconf_node_insert(&flattened_dep->iter, flattened_dep, &world->required); + pkgconf_node_insert(&flattened_dep->iter, flattened_dep, &world->requires_private); + } } - - PKGCONF_FOREACH_LIST_ENTRY(pkg->requires_private.head, node) + else { - pkgconf_dependency_t *flattened_dep; + PKGCONF_FOREACH_LIST_ENTRY(pkg->required.head, node) + { + pkgconf_dependency_t *flattened_dep; - flattened_dep = pkgconf_dependency_copy(client, node->data); + flattened_dep = pkgconf_dependency_copy(client, node->data); - pkgconf_node_insert(&flattened_dep->iter, flattened_dep, &world->requires_private); + pkgconf_node_insert(&flattened_dep->iter, flattened_dep, &world->required); + } } }