Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 409741 - x11-libs/pango index generation in alternate $ROOT fails
Summary: x11-libs/pango index generation in alternate $ROOT fails
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-26 09:37 UTC by Nicolas Perrenoud
Modified: 2012-04-01 18:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Perrenoud 2012-03-26 09:37:55 UTC
In the post install action, the Pango ebuild generates an index of all modules in /etc/pango/pango.modules. The problem is, it does not consider the case where an alternate ROOT environment variable is set (e.g. when bootstrapping a custom distribution in a dedicated ROOT direcotry). 

In x11-libs/pango/pango-1.29.4.ebuild, the postinst method is as follows:

pkg_postinst() {
    einfo "Generating modules listing..."

    local PANGO_CONFDIR="${EROOT}/etc/pango"
    multilib_enabled && PANGO_CONFDIR+="/${CHOST}"

    mkdir -p "${PANGO_CONFDIR}"
    pango-querymodules \
        "${EROOT}"usr/$(get_libdir)/pango/1.6.0/modules/*.so \
        > "${PANGO_CONFDIR}"/pango.modules
}

I'd suggest changing the module generation part to something like this:

if [ "$ROOT" != "" ]; then
	mkdir -p "$ROOT"${PANGO_CONFDIR}
	chroot "$ROOT" /usr/bin/pango-querymodules > "$ROOT"${PANGO_CONFDIR}/pango.modules
fi
Comment 1 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-03-26 13:30:41 UTC
Please give the exact error messages that you are seeing. It is not clear from your report what error you are experiencing.
Comment 2 Nicolas Perrenoud 2012-03-26 13:39:39 UTC
The error message is, that the pango modules file (and the /etc/pango directory) does of course not exist on the target system when using a program which depends on pango, because it was not created by the ebuild. 

An example would be rrdtool graph, which throws the following error:


(process:24917): Pango-CRITICAL **: No modules found:
No builtin or dynamically loaded modules were found.
PangoFc will not work correctly.
This probably means there was an error in the creation of:
  '/etc/pango/pango.modules'
You should create this file by running:
  pango-querymodules > '/etc/pango/pango.modules'

(process:24917): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='common'

(process:24917): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='latin'
Comment 3 Pacho Ramos gentoo-dev 2012-03-26 17:49:46 UTC
We will need to add a "|| die" to pango-querymodules too :S
Comment 4 Pacho Ramos gentoo-dev 2012-04-01 18:03:50 UTC
+  01 Apr 2012; Pacho Ramos <pacho@gentoo.org> pango-1.29.4.ebuild,
+  pango-1.30.0.ebuild:
+  Add a die statement to catch pango.modules generation problems like bug
+  #409741 by Nicolas Perrenoud.
+

Now we need you to re-emerge it after syncing to get the failure and post it here