Dump include paths when we can't find rules
authorDaniel Stone <daniel@fooishbar.org>
Thu, 26 Apr 2012 14:02:49 +0000 (16:02 +0200)
committerDaniel Stone <daniel@fooishbar.org>
Thu, 26 Apr 2012 14:02:49 +0000 (16:02 +0200)
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>
src/xkbcomp/xkbcomp.c

index ef7d6a9..418a803 100644 (file)
@@ -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;
     }