main: stub out --print-provides

feature/tap-sh
William Pitcock 2015-04-20 09:45:03 -05:00
parent a81cddcd35
commit 2bee0006cd
1 changed files with 10 additions and 0 deletions

10
main.c
View File

@ -45,6 +45,7 @@
#define PKG_PRINT_ERRORS (1<<26) #define PKG_PRINT_ERRORS (1<<26)
#define PKG_SIMULATE (1<<27) #define PKG_SIMULATE (1<<27)
#define PKG_NO_CACHE (1<<28) #define PKG_NO_CACHE (1<<28)
#define PKG_PROVIDES (1<<29)
static unsigned int global_traverse_flags = PKGF_NONE; static unsigned int global_traverse_flags = PKGF_NONE;
@ -611,6 +612,7 @@ main(int argc, char *argv[])
{ "list-all", no_argument, &want_flags, PKG_LIST|PKG_PRINT_ERRORS, }, { "list-all", no_argument, &want_flags, PKG_LIST|PKG_PRINT_ERRORS, },
{ "simulate", no_argument, &want_flags, PKG_SIMULATE, }, { "simulate", no_argument, &want_flags, PKG_SIMULATE, },
{ "no-cache", no_argument, &want_flags, PKG_NO_CACHE, }, { "no-cache", no_argument, &want_flags, PKG_NO_CACHE, },
{ "print-provides", no_argument, &want_flags, PKG_PROVIDES, },
{ "debug", no_argument, &want_flags, 0, }, { "debug", no_argument, &want_flags, 0, },
{ NULL, 0, NULL, 0 } { NULL, 0, NULL, 0 }
}; };
@ -874,6 +876,14 @@ main(int argc, char *argv[])
goto out; goto out;
} }
if ((want_flags & PKG_PROVIDES) == PKG_PROVIDES)
{
fprintf(stderr, "pkgconf: warning: --print-provides requested which is intentionally unimplemented, along with\n");
fprintf(stderr, " the rest of the Provides system. The Provides system is broken by design and requires loading every\n");
fprintf(stderr, " package module to calculate the dependency graph. In practice, there are no consumers of this system\n");
fprintf(stderr, " so it will remain unimplemented until such time that something actually uses it.\n");
}
if ((want_flags & PKG_DIGRAPH) == PKG_DIGRAPH) if ((want_flags & PKG_DIGRAPH) == PKG_DIGRAPH)
{ {
want_flags &= ~(PKG_CFLAGS|PKG_LIBS); want_flags &= ~(PKG_CFLAGS|PKG_LIBS);