On Sun, Nov 02, 2008 at 11:46:16PM -0500, Trevor Harmon wrote:
> For Java-based packages, Fink keeps track of the current CLASSPATH  
> setting in the /sw/share/java/classpath file. Packages also store  
> their JAR files in /sw/share/java/%n. This causes a name collision if  
> a package happens to be named "classpath": Fink will put the package's  
> JARs into a directory called /sw/share/java/classpath, but it will  
> also try to create a file called /sw/share/java/classpath. Kaboom!
> 
> Of course, this problem only occurs with one package -- the one for  
> the GNU Classpath project -- and could be worked around by renaming it  
> to gclasspath, for example. Still, packages should not have to be  
> renamed just because Fink puts a file in the wrong place. Fink should  
> instead use a different file name, such as classpath.txt, to store the  
> CLASSPATH.
> 
> Thoughts?

Yeah, that's a problem. Some would say it should be stored in var/
instead of share/ per usual FHS meanings (such as we have:) Or in
general not store general metadata or other index files in the same
place as actual fink-installed files. A minor headache to move or
rename it, is that the file is created via scripts from fink itself
(stored in the .deb) but read by init.sh which is from base-files.
Gotta make sure this one package BDep on a new fink but also that all
.deb that are created by new fink Dep on the new base-files. Since
there's only one collision and it's well-characterized (now:/ if
renaming it solves the problem, that's probably easiest. Or does it
also involve altering "any package that uses that class" (I don't know
if java uses CLASSPATH to read the .jar and find the classes that way,
or uses CLASSPATH itself as primary index to find classes).

What we *really* should do is have each .deb store its CLASSPATH
fragment somewhere and collect "the fragments" in init.sh instead of
constantly rewriting a unified global file. We already do that for
several perl things, works well. Of course migrating to this is no
easier than migrating to the other alternative.

OTOH, the whole CLASSPATH game is actually broken. If one has lots of
them installed, the length of CLASSPATH can exceed the limit for env
var values in certain shells, and then bin/init.* crashes or stores a
truncated value. I have no idea if there *is* a solution to that.

dan

-- 
Daniel Macks
[EMAIL PROTECTED]
http://www.netspace.org/~dmacks


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Fink-devel mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.devel

Reply via email to