pkg: ensure libs.private merging is always after libs
parent
3e03f2d9aa
commit
390ff275c5
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 *frag;
|
||||
(void) flags;
|
||||
|
||||
PKG_FOREACH_LIST_ENTRY(pkg->libs, frag)
|
||||
*list = pkg_fragment_copy(*list, frag);
|
||||
}
|
||||
|
||||
if (flags & PKGF_MERGE_PRIVATE_FRAGMENTS)
|
||||
{
|
||||
PKG_FOREACH_LIST_ENTRY(pkg->libs_private, frag)
|
||||
*list = pkg_fragment_copy(*list, frag);
|
||||
}
|
||||
static void
|
||||
pkg_libs_private_collect(pkg_t *pkg, void *data, unsigned int flags)
|
||||
{
|
||||
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 *
|
||||
|
@ -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);
|
||||
|
||||
if (flags & PKGF_MERGE_PRIVATE_FRAGMENTS)
|
||||
pkg_traverse(root, pkg_libs_private_collect, list, maxdepth, flags);
|
||||
|
||||
return *list;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue