forked from ariadne/pkgconf
pkg: ensure libs.private merging is always after libs
parent
f334d6d7d7
commit
4de01dd45b
19
pkg.c
19
pkg.c
|
@ -860,15 +860,21 @@ pkg_libs_collect(pkg_t *pkg, void *data, unsigned int flags)
|
||||||
{
|
{
|
||||||
pkg_fragment_t **list = data;
|
pkg_fragment_t **list = data;
|
||||||
pkg_fragment_t *frag;
|
pkg_fragment_t *frag;
|
||||||
|
(void) flags;
|
||||||
|
|
||||||
PKG_FOREACH_LIST_ENTRY(pkg->libs, frag)
|
PKG_FOREACH_LIST_ENTRY(pkg->libs, frag)
|
||||||
*list = pkg_fragment_copy(*list, frag);
|
*list = pkg_fragment_copy(*list, frag);
|
||||||
|
}
|
||||||
|
|
||||||
if (flags & PKGF_MERGE_PRIVATE_FRAGMENTS)
|
static void
|
||||||
{
|
pkg_libs_private_collect(pkg_t *pkg, void *data, unsigned int flags)
|
||||||
PKG_FOREACH_LIST_ENTRY(pkg->libs_private, frag)
|
{
|
||||||
*list = pkg_fragment_copy(*list, frag);
|
pkg_fragment_t **list = data;
|
||||||
}
|
pkg_fragment_t *frag;
|
||||||
|
(void) flags;
|
||||||
|
|
||||||
|
PKG_FOREACH_LIST_ENTRY(pkg->libs_private, frag)
|
||||||
|
*list = pkg_fragment_copy(*list, frag);
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_fragment_t *
|
pkg_fragment_t *
|
||||||
|
@ -876,5 +882,8 @@ pkg_libs(pkg_t *root, pkg_fragment_t **list, int maxdepth, unsigned int flags)
|
||||||
{
|
{
|
||||||
pkg_traverse(root, pkg_libs_collect, list, maxdepth, flags);
|
pkg_traverse(root, pkg_libs_collect, list, maxdepth, flags);
|
||||||
|
|
||||||
|
if (flags & PKGF_MERGE_PRIVATE_FRAGMENTS)
|
||||||
|
pkg_traverse(root, pkg_libs_private_collect, list, maxdepth, flags);
|
||||||
|
|
||||||
return *list;
|
return *list;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue