libpkgconf: pkg: pkgconf_pkg_report_graph_error(): move already_sent_notice to pkgconf_client_t

feature/tap-sh
William Pitcock 2017-09-08 19:48:31 -05:00
parent b0ef708efc
commit 615bab3df9
2 changed files with 4 additions and 4 deletions

View File

@ -161,6 +161,8 @@ struct pkgconf_client_ {
unsigned int flags;
char *prefix_varname;
bool already_sent_notice;
};
/* client.c */

View File

@ -1292,16 +1292,14 @@ pkgconf_pkg_verify_graph(pkgconf_client_t *client, pkgconf_pkg_t *root, int dept
static unsigned int
pkgconf_pkg_report_graph_error(pkgconf_client_t *client, pkgconf_pkg_t *parent, pkgconf_pkg_t *pkg, pkgconf_dependency_t *node, unsigned int eflags)
{
static bool already_sent_notice = false;
if (eflags & PKGCONF_PKG_ERRF_PACKAGE_NOT_FOUND)
{
if (!(client->flags & PKGCONF_PKG_PKGF_SIMPLIFY_ERRORS) & !already_sent_notice)
if (!(client->flags & PKGCONF_PKG_PKGF_SIMPLIFY_ERRORS) & !client->already_sent_notice)
{
pkgconf_error(client, "Package %s was not found in the pkg-config search path.\n", node->package);
pkgconf_error(client, "Perhaps you should add the directory containing `%s.pc'\n", node->package);
pkgconf_error(client, "to the PKG_CONFIG_PATH environment variable\n");
already_sent_notice = true;
client->already_sent_notice = true;
}
pkgconf_error(client, "Package '%s', required by '%s', not found\n", node->package, parent->id);