pkg: add PKGF_SKIP_ROOT_VIRTUAL for some queries like --variable

pull/15/head
William Pitcock 2012-05-06 23:26:21 -05:00
parent e104def516
commit f663f7922c
2 changed files with 4 additions and 0 deletions

3
pkg.c
View File

@ -594,6 +594,9 @@ pkg_traverse(pkg_t *root,
return eflags;
}
if ((root->flags & PKG_PROPF_VIRTUAL) && (flags & PKGF_SKIP_ROOT_VIRTUAL))
return eflags;
if (pkg_traverse_func != NULL)
pkg_traverse_func(root, data);

1
pkg.h
View File

@ -124,6 +124,7 @@ struct pkg_ {
#define PKGF_SEARCH_PRIVATE 0x1
#define PKGF_ENV_ONLY 0x2
#define PKGF_NO_UNINSTALLED 0x4
#define PKGF_SKIP_ROOT_VIRTUAL 0x8
#define PKG_ERRF_OK 0x0
#define PKG_ERRF_PACKAGE_NOT_FOUND 0x1