rpms/ruby/devel ruby-1.8.6-p369-ri-gem_multipath.patch, NONE, 1.1 ruby.spec, 1.139, 1.140

Mamoru Tasaka mtasaka at fedoraproject.org
Tue Oct 13 18:03:03 UTC 2009


Author: mtasaka

Update of /cvs/extras/rpms/ruby/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21380/devel

Modified Files:
	ruby.spec 
Added Files:
	ruby-1.8.6-p369-ri-gem_multipath.patch 
Log Message:
* Wed Oct 14 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.8.6.369-4
- Fix the search path of ri command for ri manuals installed with gem
  (bug 528787)


ruby-1.8.6-p369-ri-gem_multipath.patch:
 ri_options.rb |    8 ++++++--
 ri_paths.rb   |   15 +++++++++++----
 2 files changed, 17 insertions(+), 6 deletions(-)

--- NEW FILE ruby-1.8.6-p369-ri-gem_multipath.patch ---
--- ruby-1.8.6-p369/lib/rdoc/ri/ri_options.rb.gemmulti	2007-02-13 08:01:19.000000000 +0900
+++ ruby-1.8.6-p369/lib/rdoc/ri/ri_options.rb	2009-10-14 01:08:42.000000000 +0900
@@ -63,7 +63,7 @@
 
         [ "--gems",         nil,    nil,
           "Include documentation from Rubygems:\n  " +
-          (RI::Paths::GEMDIRS ? "#{Gem.path}/doc/*/ri" :
+          (RI::Paths::GEMDIRS ? ( tmppath=""; Gem.path.each {|path| tmppath += "#{path}/doc/*/ri "}; tmppath) :
                                 "No Rubygems ri found.") ],
                                                            
         [ "--format",       "-f",   "<name>",
@@ -136,7 +136,11 @@
           RI::Paths::HOMEDIR
         ]
 
-        directories << "#{Gem.path}/doc/*/ri" if RI::Paths::GEMDIRS
+        if RI::Paths::GEMDIRS
+          Gem.path.each {|gempath|
+            directories << "#{gempath}/doc/*/ri"
+          }
+        end
 
         directories = directories.join("\n    ")
 
--- ruby-1.8.6-p369/lib/rdoc/ri/ri_paths.rb.gemmulti	2007-02-13 08:01:19.000000000 +0900
+++ ruby-1.8.6-p369/lib/rdoc/ri/ri_paths.rb	2009-10-13 19:58:07.000000000 +0900
@@ -43,9 +43,14 @@
     PATH = [ SYSDIR, SITEDIR, HOMEDIR ].find_all {|p| p && File.directory?(p)}
 
     begin
-      require 'rubygems'
-      GEMDIRS = Dir["#{Gem.path}/doc/*/ri"]
-      GEMDIRS.each { |path| RI::Paths::PATH << path }
+      require 'rubygems'  
+      gemdirs = []
+      Gem.path.each{ |gempath| 
+         ripath = Dir["#{gempath}/doc/*/ri"]
+         ripath.each { |path| RI::Paths::PATH << path }
+         gemdirs << gempath
+      }
+      GEMDIRS = gemdirs
     rescue LoadError
       GEMDIRS = nil
     end
@@ -71,7 +76,9 @@
       path << RI::Paths::SYSDIR if use_system
       path << RI::Paths::SITEDIR if use_site
       path << RI::Paths::HOMEDIR if use_home
-      path << RI::Paths::GEMDIRS if use_gems
+      if use_gems
+         RI::Paths::GEMDIRS.each {|gemdirs| path << gemdirs }
+      end
 
       return path.flatten.compact
     end


Index: ruby.spec
===================================================================
RCS file: /cvs/extras/rpms/ruby/devel/ruby.spec,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -p -r1.139 -r1.140
--- ruby.spec	26 Aug 2009 10:11:58 -0000	1.139
+++ ruby.spec	13 Oct 2009 18:03:03 -0000	1.140
@@ -16,7 +16,7 @@
 
 Name:		ruby
 Version:	%{rubyver}%{?dotpatchlevel}
-Release:	3%{?dist}
+Release:	4%{?dist}
 License:	Ruby or GPLv2
 URL:		http://www.ruby-lang.org/
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -50,6 +50,7 @@ Patch27:        ruby-1.8.6-p287-CVE-2008
 Patch28:        ruby-1.8.6-p287-remove-ssl-rand-range.patch
 Patch29:	ruby-always-use-i386.patch
 Patch30:	ruby-openssl-1.0.patch
+Patch31:	ruby-1.8.6-p369-ri-gem_multipath.patch
 
 Summary:	An interpreter of object-oriented scripting language
 Group:		Development/Languages
@@ -180,6 +181,7 @@ pushd %{name}-%{arcver}
 %patch28 -p1
 %patch29 -p1
 %patch30 -p2
+%patch31 -p1
 popd
 
 %build
@@ -546,6 +548,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_emacs_sitestartdir}/ruby-mode-init.el
 
 %changelog
+* Wed Oct 14 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.8.6.369-4
+- Fix the search path of ri command for ri manuals installed with gem
+  (bug 528787)
+
 * Wed Aug 26 2009 Tomas Mraz <tmraz at redhat.com> - 1.8.6.369-3
 - Rebuild against new openssl
 




More information about the scm-commits mailing list