Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 28366 Details for
Bug 46231
java-config not setting user CLASSPATH for tcsh users
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for jc_options to add this functionality
jc_options.py.diff (text/plain), 4.08 KB, created by
Keith Burch
on 2004-03-30 04:45:34 UTC
(
hide
)
Description:
patch for jc_options to add this functionality
Filename:
MIME Type:
Creator:
Keith Burch
Created:
2004-03-30 04:45:34 UTC
Size:
4.08 KB
patch
obsolete
>*** jc_options.py_orig Mon Mar 29 17:35:24 2004 >--- jc_options.py Tue Mar 30 07:20:13 2004 >*************** class SetUserClasspath (jc_iface.OptInte >*** 693,704 **** > 'CLASSPATH=${CLASSPATH}:' + collect_packages(args) > ) > >! if not os.path.isfile(os.path.join(jc_dir, 'java-env')): > > file(os.path.join(jc_dir, 'java-env'), 'w').write( > source_java_classpath > ) > > class AppendUserClasspath (jc_iface.OptInterface): > > usage = ( >--- 693,712 ---- > 'CLASSPATH=${CLASSPATH}:' + collect_packages(args) > ) > >! file(os.path.join(jc_dir, 'java-env-classpath.csh'), 'w').write( >! 'setenv CLASSPATH ${CLASSPATH}:' + collect_packages(args) >! ) > >+ if not os.path.isfile(os.path.join(jc_dir, 'java-env')): > file(os.path.join(jc_dir, 'java-env'), 'w').write( > source_java_classpath > ) > >+ if not os.path.isfile(os.path.join(jc_dir, 'java-env.csh')): >+ file(os.path.join(jc_dir, 'java-env'), 'w').write( >+ source_java_classpath_csh >+ ) >+ > class AppendUserClasspath (jc_iface.OptInterface): > > usage = ( >*************** class AppendUserClasspath (jc_iface.OptI >*** 718,734 **** > > if not os.path.isdir(jc_dir): > os.mkdir(jc_dir) > >! elif os.path.isfile(os.path.join(jc_dir, 'java-env-classpath')): > old_classpath = file(os.path.join(jc_dir, 'java-env-classpath'), 'r').read() > old_classpath = re.sub('CLASSPATH=\${CLASSPATH}:', '', old_classpath)[:-1] > > file(os.path.join(jc_dir, 'java-env-classpath'), 'w').write( >! 'CLASSPATH=${CLASSPATH}:' + old_classpath + ':' + collect_packages(args) > ) > >! if not os.path.isfile(os.path.join(jc_dir, 'java-env')): >! file(os.path.join(jc_dir, 'java-env'), 'w').write(source_java_classpath) > > class CleanSystemClasspath (jc_iface.OptInterface): > >--- 726,759 ---- > > if not os.path.isdir(jc_dir): > os.mkdir(jc_dir) >+ print "Didn't find user settings" >+ >+ old_classpath = None > >! if os.path.isfile(os.path.join(jc_dir, 'java-env-classpath')): > old_classpath = file(os.path.join(jc_dir, 'java-env-classpath'), 'r').read() > old_classpath = re.sub('CLASSPATH=\${CLASSPATH}:', '', old_classpath)[:-1] >+ print "old: " + old_classpath > > file(os.path.join(jc_dir, 'java-env-classpath'), 'w').write( >! 'CLASSPATH=${CLASSPATH}:%s%s\n' % ( >! old_classpath is not None and (old_classpath + ':') or '', >! collect_packages(args) >! ) > ) > >! old_classpath = None >! >! if os.path.isfile(os.path.join(jc_dir, 'java-env-classpath.csh')): >! old_classpath = file(os.path.join(jc_dir, 'java-env-classpath.csh'), 'r').read() >! old_classpath = re.sub('setenv CLASSPATH \${CLASSPATH}:', '', old_classpath)[:-1] >! >! file(os.path.join(jc_dir, 'java-env-classpath.csh'), 'w').write( >! 'setenv CLASSPATH ${CLASSPATH}:%s%s\n' % ( >! old_classpath is not None and (old_classpath + ':') or '', >! collect_packages(args) >! ) >! ) > > class CleanSystemClasspath (jc_iface.OptInterface): > >*************** class CleanUserClasspath (jc_iface.OptIn >*** 767,782 **** > > names = ('x', 'clean-user-classpath') > require_root = False >- env_file = os.path.join(env['HOME'], '.gentoo', 'java-env-classpath') > > def __call__(self, args): > >! if os.path.isfile(self.env_file): >! print 'Cleaning user classpath...' >! os.remove(self.env_file) >! print 'User classpath cleaned' > else: >! print 'No user classpath file found' > > class NoColors (jc_iface.OptInterface): > >--- 792,816 ---- > > names = ('x', 'clean-user-classpath') > require_root = False > > def __call__(self, args): > >! jc_dir = os.path.join(env['HOME'], '.gentoo') >! >! if not os.path.isdir(jc_dir): >! os.mkdir(jc_dir) >! print 'No user settings found' >! > else: >! print 'Cleaning user classpath... (bash)' >! >! if os.path.isfile(os.path.join(jc_dir, 'java-env-classpath')): >! os.remove(os.path.join(jc_dir, 'java-env-classpath')) >! >! if os.path.isfile(os.path.join(jc_dir, 'java-env-classpath.csh')): >! os.remove(os.path.join(jc_dir, 'java-env-classpath.csh')) >! >! print 'User classpath cleaned' > > class NoColors (jc_iface.OptInterface): >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 46231
: 28366