java-config -B <package-name> fails, because the new part of the classpath is added after the newline of the old classpath. This results in a "CLASSPATH=<oldclasspath>" line and a second line with ":<newclasspath>" in /etc/env.d/21java-classpath. See below for a complete example. I'm not a python expert, but I've included a patch for jc_options.py that works for me here. Reproducible: Always Steps to Reproduce: 1.Start with an /etc/env.d/21java-classpath with this content (one big line): ------------cut--------------------- CLASSPATH=/usr/share/jdbc2-oracle-9.2.0.3/lib/classes12.zip:/usr/share/jdbc2-oracle-9.2.0.3/lib/nls_charset12.zip:/usr/share/jdbc2-oracle-9.2.0.3/lib/ocrs12.zip:/usr/share/jdbc-mysql/lib/mysql-connector-java-3.0.11-stable-bin.jar:/usr/share/jmx/lib/jmxri.jar:/usr/share/jmx/lib/jmxtools.jar ------------cut--------------------- 2. now e.g. do java-config -B bsh 3.This results in an /etc/env.d/21java-classpath with this content (two lines): ------------cut--------------------- CLASSPATH=/usr/share/jdbc2-oracle-9.2.0.3/lib/classes12.zip:/usr/share/jdbc2-oracle-9.2.0.3/lib/nls_charset12.zip:/usr/share/jdbc2-oracle-9.2.0.3/lib/ocrs12.zip:/usr/share/jdbc-mysql/lib/mysql-connector-java-3.0.11-stable-bin.jar:/usr/share/jmx/lib/jmxri.jar:/usr/share/jmx/lib/jmxtools.jar :/usr/share/bsh/lib/bsh-2.0b1.jar ------------cut--------------------- Actual Results: a broken /etc/env.d/21java-classpath with two lines ------------cut--------------------- CLASSPATH=/usr/share/jdbc2-oracle-9.2.0.3/lib/classes12.zip:/usr/share/jdbc2-oracle-9.2.0.3/lib/nls_charset12.zip:/usr/share/jdbc2-oracle-9.2.0.3/lib/ocrs12.zip:/usr/share/jdbc-mysql/lib/mysql-connector-java-3.0.11-stable-bin.jar:/usr/share/jmx/lib/jmxri.jar:/usr/share/jmx/lib/jmxtools.jar :/usr/share/bsh/lib/bsh-2.0b1.jar ------------cut--------------------- Expected Results: a working /etc/env.d/21java-classpath with one line like this: ------------cut--------------------- CLASSPATH=/usr/share/jdbc2-oracle-9.2.0.3/lib/classes12.zip:/usr/share/jdbc2-oracle-9.2.0.3/lib/nls_charset12.zip:/usr/share/jdbc2-oracle-9.2.0.3/lib/ocrs12.zip:/usr/share/jdbc-mysql/lib/mysql-connector-java-3.0.11-stable-bin.jar:/usr/share/jmx/lib/jmxri.jar:/usr/share/jmx/lib/jmxtools.jar:/usr/share/bsh/lib/bsh-2.0b1.jar ------------cut--------------------- Portage 2.0.50-r9 (default-x86-2004.2, gcc-3.3.3, glibc-2.3.3.20040420-r1, 2.6.7-gentoo-r11) ================================================================= System uname: 2.6.7-gentoo-r11 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz Gentoo Base System version 1.4.16 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs buildpkg ccache sandbox" GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo http://ftp.uni-erlangen.de/pub/mirrors/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://localhost:4040/gentoo-portage" USE="X alsa apm arts avi berkdb crypt cups curl dga divx4linux doc dvd emacs encode esd foomaticdb gdbm gif gpm gtk gtk2 guile imagemagick imap imlib innodb jabber java jce jpeg junit kde ldap libg++ libwww linguas_de linguas_en linguas_nds log4j mad mbox mikmod mmx motif mozilla mpeg mysql ncurses nls nvidia oci8 odbc offensive oggvorbis opengl oss pam pdflib perl png python qt quicktime readline ruby samba sdl slang slp spell sse ssl svga tcltk tcpd tetex tiff truetype unicode usb x86 xalan xemacs xerces xface xml2 xmms xv zlib"
Created attachment 37274 [details, diff] Patch for /usr/lib/python2.3/site-packages/java_config/jc_options.py
Is this still an issue? I cannot seem to reproduce this anymore, and this part of the code has been rewritten and improved since 1.2.11 (to be released). If it turns out to still bug you, reopen the bug with a use case.