Skip to content
  • Allison Karlitskaya's avatar
    gsettings: stay compatible with installed schemas · 2b8f1315
    Allison Karlitskaya authored
    Bug 747209 introduced an error when multiple <summary> or <description>
    tags are found for a single key in a GSettings schema.  This check
    should have been present from the start, but it was left out because the
    schema compiler doesn't include these items in the cache file.  Even
    still -- part of the schema compiler's job is validation, and it should
    be enforcing proper syntax here.
    
    Repeated <summary> and <description> tags are a semi-common problem when
    intltool has been misconfigured in the build system of a package, but
    it's possible to imagine mistakes being made by hand as well.
    
    The idea is that these problems would be caught during the build of a
    package and maintainers would be forced to fix their build systems.
    
    An unintended side-effect of this change, however, is that the schema
    compiler started ignoring already-installed schemas that contained these
    problems, when rebuilding the cache.  This means that the installation
    of _any_ application would cause the regeneration of the entire cache,
    with these already-installed applications being excluded.  Without the
    schema in the cache, the application would crash on next startup.
    
    The validation check in the gsettings m4 macro passes --strict to the
    compiler, which is not used when rebuilding the cache after
    installation.  Pass this flag down into the parser and only throw the
    error in case --strict was given.  This will result in the (desired)
    build failure without also causing already-installed apps to stop
    functioning.
    
    This means that we will not get even a warning about the invalid schema
    file in the already-installed case, but that's fine.  There is no sense
    spamming the user with these messages when they are already quite fatal
    for the developer at build time.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=747472
    2b8f1315