I had this error every time I tried to emerge something: ---------- !!! Unexpected end of config file: variable :/usr/share/systray4j/lib/systray4j. jar Traceback (most recent call last): File "/usr/bin/emerge", line 2599, in ? mydepgraph.merge(mydepgraph.altlist()) File "/usr/bin/emerge", line 1555, in merge retval=portage.doebuild(y,"merge",myroot,self.pkgsettings,edebug) File "/usr/lib/portage/pym/portage.py", line 2367, in doebuild return merge(mysettings["CATEGORY"],mysettings["PF"],mysettings["D"],mysetti ngs["BUILDDIR"]+"/build-info",myroot,mysettings,myebuild=mysettings["EBUILD"]) File "/usr/lib/portage/pym/portage.py", line 2489, in merge return mylink.merge(pkgloc,infloc,myroot,myebuild) File "/usr/lib/portage/pym/portage.py", line 5928, in merge return self.treewalk(mergeroot,myroot,inforoot,myebuild,cleanup=cleanup) File "/usr/lib/portage/pym/portage.py", line 5648, in treewalk env_update(makelinks=0) File "/usr/lib/portage/pym/portage.py", line 630, in env_update myconfig=getconfig(root+"etc/env.d/"+x) File "/usr/lib/portage/pym/portage.py", line 935, in getconfig raise Exception("ParseError: Unexpected EOF: "+str(mycfg)+": on/before line "+str(lex.lineno)) Exception: ParseError: Unexpected EOF: /etc/env.d/21java-classpath: on/before li ne 3 ---------- The file /etc/env.d/21java-classpath contained: ---------- CLASSPATH=/usr/share/systray4j/lib/systray4j.jar :/usr/share/systray4j/lib/systray4j.jar ---------- After running 'java-config --clean-system-classpath' the file /etc/env.d/21java-classpath was gone and everything works fine. I had been fiddling with systray4j and classpath (in order to compile Azureus from source), and I guess I added systray4j to the classpath twice. Still, this should not make emerge crash. Reproducible: Always Steps to Reproduce: 1. 2. 3.
More info: Running 'java-config --add-system-classpath=systray4j' once will create a new /etc/env.d/21java-classpath with only one entry, and everything works. Running java-config again will add the second entry in 21java-classpath, and the error is back. Also, env-update also crashes with ---------- !!! Unexpected end of config file: variable :/usr/share/systray4j/lib/systray4j.jar Traceback (most recent call last): File "/usr/sbin/env-update", line 11, in ? portage.env_update() File "/usr/lib/portage/pym/portage.py", line 630, in env_update myconfig=getconfig(root+"etc/env.d/"+x) File "/usr/lib/portage/pym/portage.py", line 935, in getconfig raise Exception("ParseError: Unexpected EOF: "+str(mycfg)+": on/before line "+str(lex.lineno)) Exception: ParseError: Unexpected EOF: /etc/env.d/21java-classpath: on/before line 3 ---------- It seems to me like this is both a problem with java-config, but the portage programs are also too sensitive.
Probably isn't supposed to be a newline in that file there. Nothing I can fix at this point or at all really.