Commit 1f81c0e163553deced177225952c17378dcf7c44

Daniel Stone 2012-04-26T16:02:49

Dump include paths when we can't find rules Since the most common failure mode here is a failure to properly set the XKB data path, dump the include path so people at least have a clue where to look. Signed-off-by: Daniel Stone <daniel@fooishbar.org>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/src/xkbcomp/xkbcomp.c b/src/xkbcomp/xkbcomp.c
index ef7d6a9..418a803 100644
--- a/src/xkbcomp/xkbcomp.c
+++ b/src/xkbcomp/xkbcomp.c
@@ -73,10 +73,15 @@ XkbComponentsFromRules(struct xkb_context *context,
     char *rulesPath = NULL;
     XkbRF_RulesPtr loaded = NULL;
     struct xkb_component_names * names = NULL;
+    int i;
 
     rulesFile = XkbFindFileInPath(context, rules, XkmRulesFile, &rulesPath);
     if (!rulesFile) {
         ERROR("could not find \"%s\" rules in XKB path\n", rules);
+        ERROR("%d include paths searched:\n",
+              xkb_context_num_include_paths(context));
+        for (i = 0; i < xkb_context_num_include_paths(context); i++)
+            ERROR("\t%s\n", xkb_context_include_path_get(context, i));
         return NULL;
     }