GNOME Bugzilla – Bug 682411
pango.modules not generated, no fonts displayed
Last modified: 2012-08-25 20:31:50 UTC
In a freshly deployed gnomeos-3.6-i686-devel system the pango.modules file is not generated. I'm assuming the trigger script for pango is failing because the directory /etc/pango/ doesn't exist, so that should be a simple fix.
Created attachment 222337 [details] [review] Patch: ensure that /etc/pango exists This patch should fix the issue. It ensures that the directory exists using “mkdir -p /etc/pango” before running “pango querymodules”.
Review of attachment 222337 [details] [review]: Hm, two things: 1) Longer term we should move this to /lib/pango or something so it's not in /etc which we do eventually want to be empty by default 2) It feels a bit lame to make this directory in the trigger - how about just patching pango to make it? If you look at the Fedora spec file, it makes it manually. From what I can tell, the Arch linux PKGBUILD may do the same thing. If we fix Pango upstream to create the empty directory, everyone wins =) Yes, making /etc/pango inside pango's Makefile.am sounds like it conflicts with the "don't have things in /etc", but I'd like to drain spec files etc. into upstream first, then we can switch Pango upstream to /lib/pango later? Oh hm...I just realized; what if this is a regression due to us upgrading automake? It used to create empty directories, but newer versions don't anymore: http://lists.gnu.org/archive/html/bug-automake/2012-03/msg00047.html
Oh crap, so if you look at pango/pango/Makefile.am: if HAVE_X pangoinclude_HEADERS += $(pangox_headers) lib_LTLIBRARIES += libpangox-1.0.la aliasdir = $(sysconfdir)/pango alias_DATA = pangox.aliases endif But that doesn't seem to be run for our Pango build...I'm looking at this.
I've made pango look for $libdir/pango/1.8.0/modules.cache in addition to $sysconfdir/pango/pango.modules in http://git.gnome.org/browse/pango/commit/?id=9bbb992671140b840bedb4339f6c326a2ae2c072
Created attachment 222426 [details] [review] improve pango trigger And now I've added an --update-cache argument to pango-querymodules which makes it take care of the cache file location on its own. This patch requires pango 1.31.1.
Review of attachment 222426 [details] [review]: Awesome, I like this patch a lot more. I think though we should (for some period of time) fall back to the old behavior if the first one fails. This is admittedly ugly, but so something like: # Newer pango has --update-cache which is exactly what we want if ! pango-querymodules --system --update-cache; then DEST=/etc/pango/pango.modules pango-querymodules --system > ${DEST}.tmp && mv ${DEST}.tmp ${DEST} fi
Sure, fine with me
Pushed with that change.