Re: GSettings and you



On 20 April 2010 15:45, Bastien Nocera <hadess hadess net> wrote:
> GSettings. Here are a couple of notes (in addition to some questions
> from Richard who was porting gnome-color-manager):

Some more questions:

1. The Gio /usr/lib/pkgconfig/gio-2.0.pc file has this:

giomoduledir=${libdir}/gio/modules
gsettingsschemadir=${prefix}/share/glib-2.0/schemas

And yet when you do:

pkg-config --variable gsettingsschemadir gio-2.0

you get:

/usr/share/glib-2.0/schemas

(i.e. the ${prefix} is substituted out, rather than being left to the
configure to substitute itself with the correct value)

This breaks "make distcheck" pretty hard. I fixed this with a bodge:

diff --git a/configure.ac b/configure.ac
index 6eba889..7d7b8de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -171,7 +171,7 @@ fi
 AC_PATH_PROG(GCONFTOOL, gconftool-2)
 AM_GCONF_SOURCE_2
 AC_SUBST(gsettingsschemadir,
-       `pkg-config --variable gsettingsschemadir gio-2.0`)
+       `cat /usr/lib/pkgconfig/gio-2.0.pc | grep gsettingsschemadir |
cut -d"=" -f2`)
 AC_SUBST(gsettingsupdateschemacache,
        `pkg-config --variable gsettingsupdateschemacache gio-2.0`)

Although we obviously need a cleaner solution than that.

2. When I do make install, I get this:

make[3]: Entering directory `/home/hughsie/Code/gnome-color-manager/data'
/usr/bin/gschema-compile --allow-any-name
/home/hughsie/.root/share/glib-2.0/schemas
Unknown option --allow-any-name
make[3]: *** [install-data-hook] Error 1

I think somebody has to cherry-pick this commit from gsettings-new to
git master.

commit 9970c6854a3e9ba12deeb9fa9ba83113bf3617d4
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Apr 16 12:53:33 2010 -0400

    Add an --allow-any-name option

    This will make it easier for people to keep their GConf key names
    in the transition period.

Ideas, thanks.

Richard.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]