Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gschema is not valid #1

Closed
flexiondotorg opened this issue Mar 18, 2018 · 2 comments
Closed

gschema is not valid #1

flexiondotorg opened this issue Mar 18, 2018 · 2 comments

Comments

@flexiondotorg
Copy link
Contributor

When installing ayatana-indicator-power the glib schema processing fails to compile the schema:

Processing triggers for libglib2.0-0:amd64 (2.55.2-2ubuntu1) ...
/usr/share/glib-2.0/schemas/org.ayatana.indicator.power.gschema.xml:4:1  Error on line 4 char 1: <enum id='icon-policy-enum'> already specified.  This entire file has been ignored.
@sunweaver
Copy link
Member

@flexiondotorg: my sense is that the enum ids must be unique across all geschema files.

Does this patch fix your issue?

diff --git a/data/org.ayatana.indicator.power.gschema.xml.in b/data/org.ayatana.indicator.power.gschema.xml.in
index 872b78e..2119aa9 100644
--- a/data/org.ayatana.indicator.power.gschema.xml.in
+++ b/data/org.ayatana.indicator.power.gschema.xml.in
@@ -1,5 +1,5 @@
 <schemalist>
-  <enum id="icon-policy-enum">
+  <enum id="ayatana-indicator-power-icon-policy-enum">
     <value nick="present" value="0" />
     <value nick="charge" value="1" />
     <value nick="never" value="2" />
@@ -15,7 +15,7 @@
       <_summary>Show percentage in Menu Bar</_summary>
       <_description>Whether or not to show the percentage in the menu bar.</_description>
     </key>
-    <key enum="icon-policy-enum" name="icon-policy">
+    <key enum="ayatana-indicator-power-icon-policy-enum" name="icon-policy">
       <default>"present"</default>
       <_summary>When to show the battery status in the menu bar.</_summary>
       <_description>Options for when to show battery status. Valid options are "present", "charge", and "never".</_description>

Apply it to the installed gschema file and run

$ sudo glib-compile-schemas /usr/share/glib-2.0/schemas/

Another pathway to silence the above error probably is removing the indicator-power. (Which would confirm my uniqueness theory).

Mike

@sunweaver
Copy link
Member

@flexiondotorg: once you have confirmed both tests above, I will check all Ayatana Indicators and make sure that enum IDs have the project name prefixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants