x11-libs/pango-1.30.1 includes the contents of the ROOT environment variable when it executes the pkg_postinst() function... The ROOT environment variable is set to force portage to install x11-libs/pango-1.30.1 into an alternate root location. That location is preserved in the auto generated pango.modules file. This should not be happening. Reproducible: Always Steps to Reproduce: ROOT=/dev/shm/tmp.mt5fasI6HQ emerge -Kqv =x11-libs/pango-1.30.1 Actual Results: Pango.modules file is corrupt (notice the ROOT variable prefix in the paths): # Pango Modules file # Automatically generated file, do not edit # /dev/shm/tmp.mt5fasI6HQ/usr/lib64/pango/1.6.0/modules/pango-arabic-fc.so ArabicScriptEngineFc PangoEngineShape PangoRenderFc arabic:* nko:* /dev/shm/tmp.mt5fasI6HQ/usr/lib64/pango/1.6.0/modules/pango-arabic-lang.so ArabicScriptEngineLang PangoEngineLang PangoRenderNone arabic:* Expected Results: Pango.modules file should not contain the ROOT variable prefix # Pango Modules file # Automatically generated file, do not edit # /usr/lib64/pango/1.6.0/modules/pango-arabic-fc.so ArabicScriptEngineFc PangoEngineShape PangoRenderFc arabic:* nko:* /usr/lib64/pango/1.6.0/modules/pango-arabic-lang.so ArabicScriptEngineLang PangoEngineLang PangoRenderNone arabic:*
We need to add ${EROOT} to support prefix, I am not sure if what you are trying to do it valid :/
you could strip off $ROOT again from what you store, e.g.: --- pango-1.30.1.ebuild 30 Apr 2013 14:04:19 -0000 1.13 +++ pango-1.30.1.ebuild 20 Oct 2013 19:28:58 -0000 @@ -78,7 +78,7 @@ if pango-querymodules --system \ "${EROOT}"usr/$(get_libdir)/pango/1.6.0/modules/*$(get_modname) \ > "${tmp_file}"; then - cat "${tmp_file}" > "${pango_conf}" || { + sed "s:^${ROOT}::" "${tmp_file}" > "${pango_conf}" || { rm "${tmp_file}"; die; } else ewarn "Cannot update pango.modules, file generation failed"
Still applies to =x11-libs/pango-1.36.2. Fabian, it may be wise to make sure $ROOT is not '/'-terminated so the resulting paths are absolute (not sure if portage does any sanitizing of $ROOT).
(In reply to Bruno from comment #3) > Still applies to =x11-libs/pango-1.36.2. > > Fabian, it may be wise to make sure $ROOT is not '/'-terminated so the > resulting paths are absolute (not sure if portage does any sanitizing of > $ROOT). From PMS (see Chapter 11 from e.g. http://dev.gentoo.org/~ulm/pms/head/pms.html): ROOT must be non-empty and end in a trailing slash. so to do what you suggested, the sed needs to be changed to sed "s:^${ROOT}:/:" "${tmp_file}" > "${pango_conf}" || {
+ 26 Jun 2014; Pacho Ramos <pacho@gentoo.org> pango-1.36.5.ebuild: + Raise gtk-doc dependency (#503510 by headcrabextra), handle ROOT in + pango.modules generation (#486214 by LeeL and Fabian Groffen) +