Project

General

Profile

Actions

Bug #1504

closed

installed ri docu is not where ri actually searches when compiled with program-suffix

Added by badboy (Jan-Erik R.) about 16 years ago. Updated about 14 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.1p129 (2009-05-12 revision 23412) [i686-linux]
Backport:

Description

=begin
when I updated to the latest patch version I noticed that ri isn't working anymore.
I'm installing with program-suffix:
./configure --enable-shared --enable-pthread --prefix=/usr --program-suffix=19
make
make install
make install-doc

All binaries get installed with program-suffix "19" in /usr/bin/
the lib directory is also suffixed: /usr/lib/ruby19/1.9.1
but the ri directory isn't: /usr/share/ri/1.9.1

in instruby.rb on line 286 the install dir is defined this way:
ridatadir = File.join(CONFIG['datadir'], "ri", CONFIG['ruby_version'], "system")

in /usr/lib/ruby19/1.9.1/rdoc/ri/paths.rb the doc dir is build like this (around line 31):
if m = /ruby/.match(RbConfig::CONFIG['RUBY_INSTALL_NAME'])
m = [m.pre_match, m.post_match]
else
m = [""] * 2
end
ri = "#{m[0]}ri#{m[1]}"
base = File.join(RbConfig::CONFIG['datadir'], ri, VERSION)

so it searches for /usr/share/ri19/1.9.1

maybe instruby.rb should be patched to include prefixes/suffixes to binaries/directories as well.

(I'm on Arch Linux, using [and maintaining] the ruby19 package: http://aur.archlinux.org/packages.php?ID=23973)
=end

Actions #1

Updated by yugui (Yuki Sonoda) about 16 years ago

=begin

Thank you, Jan-Erik.

On 5/22/09 6:46 PM, Yuki Sonoda wrote:

Bug #1504: installed ri docu is not where ri actually searches when compiled with program-suffix
http://redmine.ruby-lang.org/issues/show/1504

Author: Yuki Sonoda
Status: Open, Priority: Normal
ruby -v: ruby 1.9.1p129 (2009-05-12 revision 23412) [i686-linux]

I cloned the issue #1502 on the Redmine and separated it to a issue on
the trunk and a issue on the 1.9.1 branch. This is why the duplicate
mail was sent to ruby-core. I'm sorry for confusing you.

The problem is just under discussion at ruby-dev too. And I fixed it at
r23539 on ruby_1_9_1.

Here is another problem. Where is the best location to place ri
documents for Ruby 1.9.2 or later?

On Ruby 1.9.2, --program-suffix and --program-prefix do not act on the
path to ruby libraries nor on the name of shared library. (r23368,
r23508). You must use --with-soname or --with-rubylibprefix in order to
modify them. Then, should ri does like this?

Suppose that --prefix=/usr/local and --program-suffix=-1.9.1,
(1) /usr/local/share/ri-1.9.1/1.9.1/
(2) /usr/local/share/ri/1.9.1/ (and you can modify it via
--with-riprefix)

Which is better? what do you think?

-- Yugui

=end

Actions #2

Updated by drbrain (Eric Hodel) about 16 years ago

=begin
On May 22, 2009, at 03:22, Yugui (Yuki Sonoda) wrote:

Here is another problem. Where is the best location to place ri
documents for Ruby 1.9.2 or later?

On Ruby 1.9.2, --program-suffix and --program-prefix do not act on the
path to ruby libraries nor on the name of shared library. (r23368,
r23508). You must use --with-soname or --with-rubylibprefix in order
to
modify them. Then, should ri does like this?

Suppose that --prefix=/usr/local and --program-suffix=-1.9.1,
(1) /usr/local/share/ri-1.9.1/1.9.1/
(2) /usr/local/share/ri/1.9.1/ (and you can modify it via
--with-riprefix)

Which is better? what do you think?

2 is better, it matches the RubyGems behavior for > 1.9.1.

=end

Actions #3

Updated by yugui (Yuki Sonoda) about 16 years ago

  • Status changed from Open to Closed

=begin
applied in r23554.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0