GNOME Bugzilla – Bug 322869
include update-pango-modules script
Last modified: 2012-08-25 17:53:41 UTC
Debian (I don't know about other distros) uses a shell script to call pango-query-modules to update the list of installed modules when the package is updated. I think this would be useful for other distros - like when 3rd party pango modules get installed. (e.g. pangographite - bug #135697).
Created attachment 55439 [details] update-pango-modules script I've modified the original script to also sort the modules. I need this so that the graphite module can be guaranteed to be last in the list (bug #135697)
While I'm not against including such an script, yours is not quite correct. First, you don't need to pass the modules to pango-querymodules. Pass nothing and it find them itself. So it's really a matter of pango-querymodules > /etc/pango/pango.modules But with configure stuff to handle arbitrary prefixes. Fedora puts the pango.modules file in /etc/pango/$arch, because the contents are apparently architecture dependent. Maybe this can wait until that issue is fixed first.
I know you don't need to pass the modules in but I'll ask the Debian maintainer why he does it. I'll ask about the arch dep stuff as well. pango-querymodules won't sort the modules so it can't guarantee that the graphite one will be last in the list. How would you propose doing that if not by passing the sorted list of modules in? I guess pango-querymodules |sort > /etc/pango/pango.modules is another option? What do you mean by "But with configure stuff to handle arbitrary prefixes."? Regards, Daniel
How does sorting gauarantee that the Graphite module goes last? We have not yet decided how to choose among available modules, but I believe that discussion is not relevant here. If we decide on anything, that logic will go into querymodules such that the output is in the preferred order. By prefix, I mean, we don't really want to write into /etc/pango/pango.modules unconditionally. That path is a configure-time option.
ok, that makes sense about the prefix. well, tbh the guarantee is a fudge by putting the graphite module in a subdir zzzgraphite which would need someone crazier to get below that. ;) It does make more sense for the logic to be in querymodules. I'll open a bug for that once I get the graphite module patch done. ok, looks like the arch stuff is related to bugs #129540 and #129534
Matthias just pushed the following to master: commit 0be0b43f677520b155004a48b8cb6e9942f40a75 Author: Matthias Clasen <mclasen@redhat.com> Date: Sat Aug 25 13:47:49 2012 -0400 Add an update-cache mode to pango-query-modules It is inconvenient for distro-builders to redirect the output of pango-query-modules to a location that depends on various factors, such as architecture and pango module version. With this commit, you can just run pango-querymodules --update-cache, and it will replace the file #libdir/pango/1.8.0/modules.cache.