Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 59615 - emerge crashes on faulty classpath in /etc/env.d/21java-classpath
Summary: emerge crashes on faulty classpath in /etc/env.d/21java-classpath
Status: RESOLVED CANTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-06 06:47 UTC by Tor Klingberg
Modified: 2004-09-08 22:12 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 Tor Klingberg 2004-08-06 06:47:56 UTC
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.
Comment 1 Tor Klingberg 2004-08-06 06:57:52 UTC
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.
Comment 2 Nicholas Jones (RETIRED) gentoo-dev 2004-09-08 22:12:26 UTC
Probably isn't supposed to be a newline in that file there.
Nothing I can fix at this point or at all really.