forked from ariadne/pkgconf
pkg: pkg_libs(): consider both Libs and Libs.private fragments at the same time instead of separately (fixes many ordering problems with --static) (closes #68)
parent
face849e5f
commit
0e0ab8318b
26
pkg.c
26
pkg.c
|
@ -1039,23 +1039,16 @@ pkg_libs_collect(pkg_t *pkg, void *data, unsigned int flags)
|
|||
PKG_FOREACH_LIST_ENTRY(pkg->libs.head, node)
|
||||
{
|
||||
pkg_fragment_t *frag = node->data;
|
||||
|
||||
pkg_fragment_copy(list, frag, flags);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
pkg_libs_private_collect(pkg_t *pkg, void *data, unsigned int flags)
|
||||
{
|
||||
pkg_list_t *list = data;
|
||||
pkg_node_t *node;
|
||||
(void) flags;
|
||||
|
||||
PKG_FOREACH_LIST_ENTRY(pkg->libs_private.head, node)
|
||||
if (flags & PKGF_MERGE_PRIVATE_FRAGMENTS)
|
||||
{
|
||||
pkg_fragment_t *frag = node->data;
|
||||
|
||||
pkg_fragment_copy(list, frag, flags);
|
||||
PKG_FOREACH_LIST_ENTRY(pkg->libs_private.head, node)
|
||||
{
|
||||
pkg_fragment_t *frag = node->data;
|
||||
pkg_fragment_copy(list, frag, flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1072,12 +1065,5 @@ pkg_libs(pkg_t *root, pkg_list_t *list, int maxdepth, unsigned int flags)
|
|||
return eflag;
|
||||
}
|
||||
|
||||
if (flags & PKGF_MERGE_PRIVATE_FRAGMENTS)
|
||||
{
|
||||
eflag = pkg_traverse(root, pkg_libs_private_collect, list, maxdepth, flags);
|
||||
if (eflag != PKG_ERRF_OK)
|
||||
pkg_fragment_free(list);
|
||||
}
|
||||
|
||||
return eflag;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue