mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 15:33:39 +02:00
girparser: Emit debug messages to show the GIR XML search path
This makes it a bit easier to see what is going on than using strace. Helps: #323, #455 Signed-off-by: Simon McVittie <smcv@debian.org>
This commit is contained in:
committed by
Simon McVittie
parent
0d739996c6
commit
79e1bc5bef
@@ -293,6 +293,7 @@ locate_gir (GIrParser *parser,
|
|||||||
const gchar *const *dir;
|
const gchar *const *dir;
|
||||||
char *path = NULL;
|
char *path = NULL;
|
||||||
|
|
||||||
|
g_debug ("Looking for %s", girname);
|
||||||
datadirs = g_get_system_data_dirs ();
|
datadirs = g_get_system_data_dirs ();
|
||||||
|
|
||||||
if (parser->includes != NULL)
|
if (parser->includes != NULL)
|
||||||
@@ -300,6 +301,7 @@ locate_gir (GIrParser *parser,
|
|||||||
for (dir = (const gchar *const *)parser->includes; *dir; dir++)
|
for (dir = (const gchar *const *)parser->includes; *dir; dir++)
|
||||||
{
|
{
|
||||||
path = g_build_filename (*dir, girname, NULL);
|
path = g_build_filename (*dir, girname, NULL);
|
||||||
|
g_debug ("Trying %s from includes", path);
|
||||||
if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
|
if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
|
||||||
return path;
|
return path;
|
||||||
g_free (path);
|
g_free (path);
|
||||||
@@ -309,6 +311,7 @@ locate_gir (GIrParser *parser,
|
|||||||
for (dir = datadirs; *dir; dir++)
|
for (dir = datadirs; *dir; dir++)
|
||||||
{
|
{
|
||||||
path = g_build_filename (*dir, GIR_SUFFIX, girname, NULL);
|
path = g_build_filename (*dir, GIR_SUFFIX, girname, NULL);
|
||||||
|
g_debug ("Trying %s from system data dirs", path);
|
||||||
if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
|
if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
|
||||||
return path;
|
return path;
|
||||||
g_free (path);
|
g_free (path);
|
||||||
@@ -316,9 +319,12 @@ locate_gir (GIrParser *parser,
|
|||||||
}
|
}
|
||||||
|
|
||||||
path = g_build_filename (GIR_DIR, girname, NULL);
|
path = g_build_filename (GIR_DIR, girname, NULL);
|
||||||
|
g_debug ("Trying %s from GIR_DIR", path);
|
||||||
if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
|
if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
|
||||||
return path;
|
return path;
|
||||||
g_free (path);
|
g_free (path);
|
||||||
|
|
||||||
|
g_debug ("Did not find %s", girname);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user