libpkgconf: queue: always walk requires.private lists internally
This ensures the internal dependency graph solution is always consistent.
We filter out the nodes we don't care about in cases where we need to filter
as of commit 86602bc
, so now we can just simplify the solving a little bit.
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
master
parent
86602bc17e
commit
a79952a084
|
@ -1726,18 +1726,15 @@ pkgconf_pkg_traverse_main(pkgconf_client_t *client,
|
|||
if (eflags != PKGCONF_PKG_ERRF_OK)
|
||||
return eflags;
|
||||
|
||||
if (client->flags & PKGCONF_PKG_PKGF_SEARCH_PRIVATE)
|
||||
{
|
||||
PKGCONF_TRACE(client, "%s: walking 'Requires.private' list", root->id);
|
||||
PKGCONF_TRACE(client, "%s: walking 'Requires.private' list", root->id);
|
||||
|
||||
/* XXX: ugly */
|
||||
client->flags |= PKGCONF_PKG_PKGF_ITER_PKG_IS_PRIVATE;
|
||||
eflags = pkgconf_pkg_walk_list(client, root, &root->requires_private, func, data, maxdepth, skip_flags);
|
||||
client->flags &= ~PKGCONF_PKG_PKGF_ITER_PKG_IS_PRIVATE;
|
||||
/* XXX: ugly */
|
||||
client->flags |= PKGCONF_PKG_PKGF_ITER_PKG_IS_PRIVATE;
|
||||
eflags = pkgconf_pkg_walk_list(client, root, &root->requires_private, func, data, maxdepth, skip_flags);
|
||||
client->flags &= ~PKGCONF_PKG_PKGF_ITER_PKG_IS_PRIVATE;
|
||||
|
||||
if (eflags != PKGCONF_PKG_ERRF_OK)
|
||||
return eflags;
|
||||
}
|
||||
if (eflags != PKGCONF_PKG_ERRF_OK)
|
||||
return eflags;
|
||||
|
||||
return eflags;
|
||||
}
|
||||
|
|
|
@ -189,18 +189,15 @@ pkgconf_queue_collect_dependencies_main(pkgconf_client_t *client,
|
|||
|
||||
root->serial = client->serial;
|
||||
|
||||
if (client->flags & PKGCONF_PKG_PKGF_SEARCH_PRIVATE)
|
||||
{
|
||||
PKGCONF_TRACE(client, "%s: collecting private dependencies, level %d", root->id, maxdepth);
|
||||
PKGCONF_TRACE(client, "%s: collecting private dependencies, level %d", root->id, maxdepth);
|
||||
|
||||
/* XXX: ugly */
|
||||
const unsigned int saved_flags = client->flags;
|
||||
client->flags |= PKGCONF_PKG_PKGF_ITER_PKG_IS_PRIVATE;
|
||||
eflags = pkgconf_queue_collect_dependencies_walk(client, &root->requires_private, data, maxdepth);
|
||||
client->flags = saved_flags;
|
||||
if (eflags != PKGCONF_PKG_ERRF_OK)
|
||||
return eflags;
|
||||
}
|
||||
/* XXX: ugly */
|
||||
const unsigned int saved_flags = client->flags;
|
||||
client->flags |= PKGCONF_PKG_PKGF_ITER_PKG_IS_PRIVATE;
|
||||
eflags = pkgconf_queue_collect_dependencies_walk(client, &root->requires_private, data, maxdepth);
|
||||
client->flags = saved_flags;
|
||||
if (eflags != PKGCONF_PKG_ERRF_OK)
|
||||
return eflags;
|
||||
|
||||
PKGCONF_TRACE(client, "%s: collecting public dependencies, level %d", root->id, maxdepth);
|
||||
|
||||
|
|
Loading…
Reference in New Issue