Esteban Manchado Velázquez wrote:
Hi TRANS, On Mon, Jun 26, 2006 at 12:17:19AM -0400, TRANS wrote:Hi, I'm workng on library/package related systems for Ruby and Debian's packaging policy puts a bit of a kink in things. According to the packaging policy 3rd-party packages are installed directly into /usr/lib/ruby/1.8/, right along side all the standard ruby distribution libs.Just curious, what do other distributions do?[...] When installing packages manually they are placed in /usr/local/lib/site_ruby/1.8/, so I would think the appropriate place for 3rd-party Debian Ruby packages would be in /usr/lib/site_ruby/1.8/.Yes, you're probably right. To do that change, though, ruby (I mean, the interpreter) compilation options will have to be changed, so /usr/lib/site_ruby/1.8 is included in $LOAD_PATH. In fact, I think we should change it anyway, because to follow the FHS, we should be installing Ruby libraries in /usr/share/something, which should translate as something like /usr/share/site_ruby/1.8.
Why not /usr/share/ruby/1.8? 'site_ruby' reads to me (and I might be wrong here) as a place to put site stuff, ie. manually installed things.
Both Emacs and Perl have a /usr/share/emacs, /usr/share/perl dir, respectively, with version subdirs. Although emacs has a site-lisp dir.
Inside /usr/local/lib I see python2.1, python2.3, etc. alongside the site_ruby dir. There the site_* prefix is rather redundant as /usr/local is for locally installed things in the first place.
I'd say that people would first look for a 'ruby' directory, rather than a 'site-ruby' directory in those places.
Another thing.. Apparently: bagheera:~# ruby -e 'p $:'["/usr/local/lib/site_ruby/1.8", "/usr/local/lib/site_ruby/1.8/i386-linux", "/usr/local/lib/site_ruby", "/usr/lib/ruby/1.8", "/usr/lib/ruby/1.8/i386-linux", "."]
bagheera:~# ls /usr/local/lib/site_ruby 1.8 bagheera:~# ruby -v ruby 1.8.2 (2005-04-11) [i386-linux]The load path points to /usr/local/lib/site_ruby without a version subdir, though it exists? The reason I just checked that, was that I was wondering where to put version independent libs (both locally, and debs). I was thinking that if $LOAD_PATH included both, say, /usr/local/lib/ruby and /usr/local/lib/ruby/1.8, one could put the independent libs in /usr/local/lib/ruby, and not have to fiddle around for multiple versions.. But maybe it's not as relevant as these transitions shouldn't happen too often?
-- Thomas Fini Hansen <xen@xen.dk>