Subject: Re: gschemas.compiled should not be added to the profile by multiple packages

From: Leo Prikler <[email-masked]>
Date: Tue, 22 Dec 2020 21:49:06 +0100

Hello Florian,

I'm writing you, because you've filed issue #26215 against Guix (see
[1] for full context).

Am Mittwoch, den 22.03.2017, 09:30 +0100 schrieb pelzflorian (Florian
Pelz):
> Currently multiple packages contain the file
> share/glib-2.0/schemas/gschemas.compiled (which is built by
> glib-or-gtk-build-system). Doing so *works* (because each package’s
> share directory in the Store is part of the XDG_DATA_DIRS environment
> variable, GSettings looks for settings in each of the
> gschemas.compiled
> files in the Store) but leads to *warnings* because only one
> package’s
> gschemas.compiled can be added to the profile at the same time.

"Currently" is perhaps a bit misleading in this context, given that
this message is three years old, but I suppose many packages still
contain compiled GSettings schemas.  (That's one of the reasons so many
packages use glib:bin after all.)

> To avoid these misleading warnings, either
> · no package’s gschemas.compiled should go to the profile on
>   install *or*
> · gschemas.compiled should not be created for each package by
>   glib-or-gtk-build-system, instead it should be created only once
>   in each profile by a profile hook from the GSettings data of all
>   packages in the manifest,
> · or something else?

Modern Guix does have a profile hook, which IIUC will be the one that's
picked upon conflict resolution.  Should we still make an effort to
remove compiled GSettings schemas where they exist, or can we mark this
bug as resolved?

Regards,
Leo

[1] http://issues.guix.gnu.org/26215