From 16ecf82fd7a9d4920aa2d67cf57df2833ab4cad5 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sat, 4 Feb 2017 20:09:21 -0600 Subject: [PATCH] libpkgconf: client: bring up the default trace handler as early as possible --- libpkgconf/client.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libpkgconf/client.c b/libpkgconf/client.c index c138eb5..601e350 100644 --- a/libpkgconf/client.c +++ b/libpkgconf/client.c @@ -62,14 +62,15 @@ pkgconf_client_init(pkgconf_client_t *client, pkgconf_error_handler_func_t error client->error_handler = error_handler; client->auditf = NULL; - pkgconf_client_set_sysroot_dir(client, NULL); - pkgconf_client_set_buildroot_dir(client, NULL); - pkgconf_client_set_prefix_varname(client, NULL); + if (client->trace_handler == NULL) + pkgconf_client_set_trace_handler(client, NULL, NULL); pkgconf_client_set_error_handler(client, error_handler, error_handler_data); pkgconf_client_set_warn_handler(client, NULL, NULL); - if (client->trace_handler == NULL) - pkgconf_client_set_trace_handler(client, NULL, NULL); + + pkgconf_client_set_sysroot_dir(client, NULL); + pkgconf_client_set_buildroot_dir(client, NULL); + pkgconf_client_set_prefix_varname(client, NULL); pkgconf_path_build_from_environ("PKG_CONFIG_SYSTEM_LIBRARY_PATH", SYSTEM_LIBDIR, &client->filter_libdirs, false); pkgconf_path_build_from_environ("PKG_CONFIG_SYSTEM_INCLUDE_PATH", SYSTEM_INCLUDEDIR, &client->filter_includedirs, false); @@ -547,7 +548,7 @@ pkgconf_client_set_trace_handler(pkgconf_client_t *client, pkgconf_error_handler if (client->trace_handler == NULL) { - PKGCONF_TRACE(client, "installing default trace handler"); client->trace_handler = pkgconf_default_error_handler; + PKGCONF_TRACE(client, "installing default trace handler"); } }