pkg: fix backwards root-leaf traversal order.
This bug causes occasional problems when calculating inter-module dependencies in complex dependency graphs, such as ffmpeg when cross-compiled. Reported-by: Alexander Kojevnikov <alexander@kojevnikov.com> Closes: Issue #33pull/36/head
parent
56ba08b617
commit
953fb66ff3
12
pkg.c
12
pkg.c
|
@ -809,6 +809,12 @@ pkg_traverse(pkg_t *root,
|
||||||
if (maxdepth == 0)
|
if (maxdepth == 0)
|
||||||
return eflags;
|
return eflags;
|
||||||
|
|
||||||
|
if ((root->flags & PKG_PROPF_VIRTUAL) != PKG_PROPF_VIRTUAL || (flags & PKGF_SKIP_ROOT_VIRTUAL) != PKGF_SKIP_ROOT_VIRTUAL)
|
||||||
|
{
|
||||||
|
if (func != NULL)
|
||||||
|
func(root, data, flags);
|
||||||
|
}
|
||||||
|
|
||||||
if (!(flags & PKGF_SKIP_CONFLICTS))
|
if (!(flags & PKGF_SKIP_CONFLICTS))
|
||||||
{
|
{
|
||||||
eflags = pkg_walk_conflicts_list(root, root->conflicts, rflags);
|
eflags = pkg_walk_conflicts_list(root, root->conflicts, rflags);
|
||||||
|
@ -827,12 +833,6 @@ pkg_traverse(pkg_t *root,
|
||||||
return eflags;
|
return eflags;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((root->flags & PKG_PROPF_VIRTUAL) && (flags & PKGF_SKIP_ROOT_VIRTUAL))
|
|
||||||
return eflags;
|
|
||||||
|
|
||||||
if (func != NULL)
|
|
||||||
func(root, data, flags);
|
|
||||||
|
|
||||||
return eflags;
|
return eflags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue