From f1bd223f7f9257f835c0614a7bcaaedf79cfb5f9 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 6 May 2012 23:28:42 -0500 Subject: [PATCH] pkg: disable PKGF_SKIP_ROOT_VIRTUAL when recursing --- pkg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg.c b/pkg.c index 7a190a2..5dda1d6 100644 --- a/pkg.c +++ b/pkg.c @@ -578,18 +578,19 @@ pkg_traverse(pkg_t *root, int maxdepth, unsigned int flags) { + unsigned int rflags = flags & ~PKGF_SKIP_ROOT_VIRTUAL; unsigned int eflags = PKG_ERRF_OK; if (maxdepth == 0) return eflags; - eflags = pkg_walk_list(root->requires, pkg_traverse_func, data, maxdepth, flags); + eflags = pkg_walk_list(root->requires, pkg_traverse_func, data, maxdepth, rflags); if (eflags != PKG_ERRF_OK) return eflags; if (flags & PKGF_SEARCH_PRIVATE) { - eflags = pkg_walk_list(root->requires_private, pkg_traverse_func, data, maxdepth, flags); + eflags = pkg_walk_list(root->requires_private, pkg_traverse_func, data, maxdepth, rflags); if (eflags != PKG_ERRF_OK) return eflags; }