Backport #4228
closedBackward gemspec compatibility change in r29663 broke rake gems
Description
=begin
Hello,
In r29200, NARUSE committed my patch that corrected gemspec issues when attempt to install rake or any of the bundled gems (see [ruby-core:32165])
Problem is, in r29663, when backported for release, the old non-version gemspec are kept along the versioned ones, defeating the purpose of the previous fix.
Now, after installing a gem that was bundled, it breaks rake, again:
C:\Users\Luis>gem list
*** LOCAL GEMS ***
minitest (1.6.0)
rake (0.8.7)
rdoc (2.5.8)
C:\Users\Luis>rake -T
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2367:in raw_load_rakefile' C:/Ruby192/lib/ruby/1.9.1/rake.rb:2007:in
block in load_rakefile'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2058:in standard_exception_handling' C:/Ruby192/lib/ruby/1.9.1/rake.rb:2006:in
load_rakefile'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1991:in run' C:/Ruby192/bin/rake:31:in
'
C:\Users\Luis>gem install rake
Successfully installed rake-0.8.7
1 gem installed
C:\Users\Luis>rake -T
C:/Ruby192/lib/ruby/1.9.1/rubygems.rb:340:in bin_path': can't find executable rake for rake-0.8.7 (Gem::Exception) from C:/Ruby192/bin/rake:19:in
'
===
Please apply the following patch:
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index ffac2bf..f690911 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -521,14 +521,6 @@ Gem::Specification.new do |s|
end
GEMSPEC
open_for_install(File.join(destdir, "#{name}-#{version}.gemspec"), $data_mode) { gemspec }
- open_for_install(File.join(destdir, "#{name}.gemspec"), $data_mode) {
-
<<-WARNING + gemspec
-# #{name}.gemspec remains just for compatibility with installation
-# before Ruby 1.9.2-p32.
-# This file will no longer exist in Ruby 1.9.3.
-# Refer #{name}-#{version}.gemspec instead.
-
WARNING
- }
end
end
To correct that issue.
Thank you.
=end
Updated by zenspider (Ryan Davis) over 13 years ago
=begin
Didn't we get you commit bit?
=end
Updated by zenspider (Ryan Davis) over 13 years ago
=begin
On Dec 31, 2010, at 00:17 , Ryan Davis wrote:
Issue #4228 has been updated by Ryan Davis.
Didn't we get you commit bit?
I spoke out of turn... As I hit "comment" I realized he was only talking about the backport of the patch itself.
=end
Updated by yugui (Yuki Sonoda) over 13 years ago
=begin
On Fri, Dec 31, 2010 at 7:11 AM, Luis Lavena redmine@ruby-lang.org wrote:
Problem is, in r29663, when backported for release, the old non-version gemspec are kept along the versioned ones, defeating the purpose of the previous fix.
Now, after installing a gem that was bundled, it breaks rake, again:
Yeah, I finally realized what was wrong in my commit. That's because
rubygems generates a new "rake" file in its bin_path, isn't that?
I committed your patch at r30579.
Thank you for the reporting. and sorry for replying so late.
--
Yuki Sonoda (Yugui)
yugui@yugui.jp
http://yugui.jp
=end
Updated by yugui (Yuki Sonoda) over 13 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r30579.
Luis, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- too/rbinstall.rb (install?(:ext, :comm, :gem)): no longer
installs no-versioned gempsecs. [ruby-core:34011]
Patch by Luis Lavena.
=end
Updated by luislavena (Luis Lavena) over 13 years ago
=begin
On Sun, Jan 16, 2011 at 10:22 AM, Yugui yugui@yugui.jp wrote:
Yeah, I finally realized what was wrong in my commit. That's because
rubygems generates a new "rake" file in its bin_path, isn't that?
Yes, something once we are in sync with RubyGems will deal with
(double-installation issue)
I committed your patch at r30579.
Thank you!¶
Luis Lavena
AREA 17
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
=end