Bug #7481

gem cleanup が正常に完了しない

Added by Hiroshi SHIBATA over 1 year ago. Updated over 1 year ago.

[ruby-dev:46670]
Status:Closed
Priority:Normal
Assignee:Kouhei Sutou
Category:core
Target version:2.0.0
ruby -v:ruby 2.0.0dev (2012-11-30 trunk 38003) [x86_64-darwin12.2.1] Backport:

Description

gem cleanup を実行すると先頭の gem のみ cleanup に成功し、以降の gem の cleanup に失敗してしまいます。

% yes | gem cleanup
WARN: Unresolved specs during Gem::Specification.reset:
rake (>= 0.8.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Cleaning up installed gems...
Attempting to uninstall psych-1.3.4
Successfully uninstalled psych-1.3.4
Attempting to uninstall mongo-1.7.1
Unable to uninstall mongo-1.7.1:
Gem::InstallError: mongo is not installed in GEM_HOME, try:
gem uninstall -i /Users/hsbt/.rbenv/versions/2.0.0-dev/lib/ruby/gems/2.0.0 mongo

Associated revisions

Revision 38117
Added by Eric Hodel over 1 year ago

  • lib/rubygems/commands/cleanup_command.rb: Fix cleanup command for multiple gems. [ruby-trunk - #7481] by Kouhei Sutou
  • test/rubygems/testgemcommandscleanupcommand.rb: Test for above.
  • lib/rubygems.rb: Autoload Gem::Source to prevent test failures

History

#1 Updated by Kouhei Sutou over 1 year ago

gem listもらえませんか!?
手元でも試してみます。

#2 Updated by Kouhei Sutou over 1 year ago

あ、再現できた気がします。一番最後のcleanupでmongo-1.7.1がuninstallできないのが問題という事ですね。

% /tmp/local/bin/gem install mongo
Fetching: i18n-0.6.1.gem (100%)
Successfully installed i18n-0.6.1
Fetching: multijson-1.4.0.gem (100%)
Successfully installed multi
json-1.4.0
Fetching: activesupport-3.2.9.gem (100%)
Successfully installed activesupport-3.2.9
Fetching: bson-1.8.0.gem (100%)
Successfully installed bson-1.8.0
Fetching: mongo-1.8.0.gem (100%)
Successfully installed mongo-1.8.0
Parsing documentation for i18n-0.6.1
Installing ri documentation for i18n-0.6.1
Parsing documentation for multijson-1.4.0
Installing ri documentation for multi
json-1.4.0
Parsing documentation for activesupport-3.2.9
Installing ri documentation for activesupport-3.2.9
Parsing documentation for bson-1.8.0
Installing ri documentation for bson-1.8.0
Parsing documentation for mongo-1.8.0
Installing ri documentation for mongo-1.8.0
Done installing documentation for i18n, multijson, activesupport, bson, mongo (27 sec).
5 gems installed
% /tmp/local/bin/gem install mongo -v 1.7.1
Fetching: bson-1.7.1.gem (100%)
Successfully installed bson-1.7.1
Fetching: mongo-1.7.1.gem (100%)
Successfully installed mongo-1.7.1
Parsing documentation for bson-1.7.1
Installing ri documentation for bson-1.7.1
Parsing documentation for mongo-1.7.1
Installing ri documentation for mongo-1.7.1
Done installing documentation for bson, mongo (22 sec).
2 gems installed
% /tmp/local/bin/gem install psych
Fetching: psych-1.3.4.gem (100%)
Building native extensions. This could take a while...
Successfully installed psych-1.3.4
Parsing documentation for psych-1.3.4
Installing ri documentation for psych-1.3.4
Done installing documentation for psych (4 sec).
1 gem installed
% /tmp/local/bin/gem cleanup
Cleaning up installed gems...
Attempting to uninstall psych-1.3.4
Successfully uninstalled psych-1.3.4
Attempting to uninstall mongo-1.7.1
Unable to uninstall mongo-1.7.1:
Gem::InstallError: mongo is not installed in GEM
HOME, try:
gem uninstall -i /tmp/local/lib/ruby/gems/2.0.0 mongo
Clean Up Complete

#3 Updated by Kouhei Sutou over 1 year ago

  • Status changed from Open to Assigned
  • % Done changed from 0 to 40

RubyGemsのリポジトリの方に修正するコミットをしておきました。drbrainに確認してもらったらtrunkの方に入ります!(drbrainが入れてくれるはず!)

https://github.com/rubygems/rubygems/commit/24fdcd744683bcc0931e895dd4eba41c725e112f

#4 Updated by Eric Hodel over 1 year ago

  • Status changed from Assigned to Closed

Committed, thank you kou!

#5 Updated by Kouhei Sutou over 1 year ago

  • % Done changed from 40 to 100

Also available in: Atom PDF