main: --exists should search Requires.private.
parent
004adad048
commit
69a6331cbe
9
main.c
9
main.c
|
@ -43,6 +43,7 @@
|
||||||
#define PKG_LIST (1<<24)
|
#define PKG_LIST (1<<24)
|
||||||
#define PKG_HELP (1<<25)
|
#define PKG_HELP (1<<25)
|
||||||
#define PKG_PRINT_ERRORS (1<<26)
|
#define PKG_PRINT_ERRORS (1<<26)
|
||||||
|
#define PKG_EXISTS (1<<27)
|
||||||
|
|
||||||
static unsigned int global_traverse_flags = PKGF_NONE;
|
static unsigned int global_traverse_flags = PKGF_NONE;
|
||||||
|
|
||||||
|
@ -425,7 +426,7 @@ main(int argc, char *argv[])
|
||||||
{ "cflags", no_argument, &want_flags, PKG_CFLAGS|PKG_PRINT_ERRORS, },
|
{ "cflags", no_argument, &want_flags, PKG_CFLAGS|PKG_PRINT_ERRORS, },
|
||||||
{ "modversion", no_argument, &want_flags, PKG_MODVERSION|PKG_PRINT_ERRORS, },
|
{ "modversion", no_argument, &want_flags, PKG_MODVERSION|PKG_PRINT_ERRORS, },
|
||||||
{ "variable", required_argument, NULL, 7, },
|
{ "variable", required_argument, NULL, 7, },
|
||||||
{ "exists", no_argument, NULL, 8, },
|
{ "exists", no_argument, &want_flags, PKG_EXISTS, },
|
||||||
{ "print-errors", no_argument, &want_flags, PKG_PRINT_ERRORS, },
|
{ "print-errors", no_argument, &want_flags, PKG_PRINT_ERRORS, },
|
||||||
{ "short-errors", no_argument, NULL, 10, },
|
{ "short-errors", no_argument, NULL, 10, },
|
||||||
{ "maximum-traverse-depth", required_argument, NULL, 11, },
|
{ "maximum-traverse-depth", required_argument, NULL, 11, },
|
||||||
|
@ -535,6 +536,12 @@ main(int argc, char *argv[])
|
||||||
if ((want_flags & PKG_STATIC) == PKG_STATIC)
|
if ((want_flags & PKG_STATIC) == PKG_STATIC)
|
||||||
global_traverse_flags |= (PKGF_SEARCH_PRIVATE | PKGF_MERGE_PRIVATE_FRAGMENTS);
|
global_traverse_flags |= (PKGF_SEARCH_PRIVATE | PKGF_MERGE_PRIVATE_FRAGMENTS);
|
||||||
|
|
||||||
|
if ((want_flags & PKG_EXISTS) == PKG_EXISTS)
|
||||||
|
global_traverse_flags |= (PKGF_SEARCH_PRIVATE);
|
||||||
|
|
||||||
|
if ((want_flags & PKG_CFLAGS) == PKG_CFLAGS)
|
||||||
|
global_traverse_flags |= (PKGF_SEARCH_PRIVATE);
|
||||||
|
|
||||||
if ((want_flags & PKG_ENV_ONLY) == PKG_ENV_ONLY)
|
if ((want_flags & PKG_ENV_ONLY) == PKG_ENV_ONLY)
|
||||||
global_traverse_flags |= PKGF_ENV_ONLY;
|
global_traverse_flags |= PKGF_ENV_ONLY;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue