diff --git a/pkg.c b/pkg.c index 8976ec5..6a8675e 100644 --- a/pkg.c +++ b/pkg.c @@ -809,6 +809,12 @@ pkg_traverse(pkg_t *root, if (maxdepth == 0) 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)) { eflags = pkg_walk_conflicts_list(root, root->conflicts, rflags); @@ -827,12 +833,6 @@ pkg_traverse(pkg_t *root, return eflags; } - if ((root->flags & PKG_PROPF_VIRTUAL) && (flags & PKGF_SKIP_ROOT_VIRTUAL)) - return eflags; - - if (func != NULL) - func(root, data, flags); - return eflags; }