sys-apps/portage-2.1.11.9 Today I updated to qt-4.8.3. After that cave fix-linkage errored out with Error: * 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 GTK2_RC_FILES="$HOME/.gtkrc-2.0"
Looks like a problem with files/44qt4-gtkstyle from x11-libs/qt-gui-4.8.3.
A-HA! portage.util.env_update._env_update: 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 GTK2_RC_FILES="${HOME}/.gtkrc-2.0" fixes the issue...
And then I expect you will get: $ echo "$GTK2_RC_FILES" ${HOME}/.gtkrc-2.0 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…
Raising severity because this has visible (and really bad effects) to users.
OK, change reverted in qt-gui-4.8.3-r1
*** Bug 435140 has been marked as a duplicate of this bug. ***