Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 435054

Summary: x11-libs/qt-gui-4.8.3: 44qt4-gtkstyle breaks /etc/profile.env
Product: Gentoo Linux Reporter: Franz Trischberger <franz.trischberger>
Component: [OLD] KDEAssignee: Qt Bug Alias <qt>
Severity: major CC: franz.trischberger, l33tmmx, slawomir.nizio
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---

Description Franz Trischberger 2012-09-14 18:11:51 UTC
Today I updated to qt-4.8.3. After that cave fix-linkage errored out with

  * In program cave fix-linkage:
  * When loading broken linkage checker configuration for '/':
  * When reading '/etc/profile.env':
  * When parsing key=value-based configuration file '/etc/profile.env':
  * In file '/etc/profile.env': Bad variable at line 15 (paludis::ConfigFileError)

line 15 is
export GTK2_RC_FILES=$'HOME/.gtkrc-2.0'
After putting the "$" behind the quotation mark everything is okay, until I run env-update, which writes the broken line, again.

$ cat /etc/env.d/44qt4-gtkstyle
Comment 1 Sławomir Nizio 2012-09-14 22:47:02 UTC
Looks like a problem with files/44qt4-gtkstyle from x11-libs/qt-gui-4.8.3.
Comment 2 Franz Trischberger 2012-09-15 06:37:52 UTC

		if v.startswith('$') and not v.startswith('${'):
			outfile.write("export %s=$'%s'\n" % (k, v[1:]))

So changing the line in /etc/env.d/44qt4-gtkstyle to
fixes the issue...
Comment 3 Sławomir Nizio 2012-09-15 12:38:01 UTC
And then I expect you will get:

$ echo "$GTK2_RC_FILES"

instead of /home/sth/.gtkrc-2.0

which doesn't work as expected unless Gtk+ interprets '${HOME}' itself (I doubt it). As far as I know, interpolating shell variables inside env.d isn't allowed.

I was curious how it's done with variables like JAVAC which include a path inside user's home directory. Its done using files /etc/profile.d/java-config-2.{c,}sh (provided by dev-java/java-config). Not sure there's a better solution or not, but it looks interesting. Btw. I'm not a Qt maintainer, just sharing my thoughts…
Comment 4 Markos Chandras (RETIRED) gentoo-dev 2012-09-15 19:00:24 UTC
Raising severity because this has visible (and really bad effects) to users.
Comment 5 Ben de Groot (RETIRED) gentoo-dev 2012-09-16 04:30:04 UTC
OK, change reverted in qt-gui-4.8.3-r1
Comment 6 Ben de Groot (RETIRED) gentoo-dev 2012-09-16 07:05:26 UTC
*** Bug 435140 has been marked as a duplicate of this bug. ***