Commit graph

8 commits

Author SHA1 Message Date
David Rodríguez
57404e4369 [rubygems/rubygems] Fix duplicated specs when they have been previously activated
b44bf2ac74
2024-10-14 14:51:20 +00:00
David Rodríguez
48410af53c [rubygems/rubygems] Fix a gem install crash during "done installing" hooks
It would happen when the gem is already installed to multiple GEM_PATHS.
RubyGems was removing duplicate specs without considering the
potentially different `base_dir`. That was causing the gem to be
misidentified as not already installed, and a nil specification getting
returned from the installer as a result, causing the crash.

Solve it by making sure `Gem::Specification.all` really iterates through
all the different specifications in all GEM_PATHs.

0d8c208f65
2024-10-09 10:07:11 +00:00
David Rodríguez
10c256f98f Sychronize with rubygems/rubygems repo 2024-06-01 01:13:55 +09:00
Hiroshi SHIBATA
ba8e6e77fd
Revert "[rubygems/rubygems] Fix gem pristine sometimes failing to pristine user installed gems"
This reverts commit a3edc4abc5.

That commit caused test failure with Windows platform.

* 2556187139
* 2556187306
2024-05-30 12:46:19 +09:00
David Rodriguez
a3edc4abc5 [rubygems/rubygems] Fix gem pristine sometimes failing to pristine user installed gems
0eb6ed8f86
2024-05-29 15:35:04 +00:00
David Rodriguez
c55c11d7d5 [rubygems/rubygems] Fix binstubs sometimes not getting regenerated when --destdir is given
This was only working for gems also installed in the default gem home.

47df02dbd9
2024-05-16 13:34:33 +00:00
David Rodriguez
965cb3ab4c [rubygems/rubygems] Fix issue when cleaning up plugin stubs
When `gem uninstall <gem> --install-dir <dir>` is run, if the version
removed had a plugin, and that same version happened to also be
installed globally, then the plugin stub would fail to be removed.

4e2fa0be77
2024-05-14 16:08:03 +00:00
David Rodriguez
bd84236169 [rubygems/rubygems] Extract a Gem::SpecificationRecord class
This class handles all logic to handle the list of specifications, given
a set of GEM_PATH directories. Makes `Gem::Specification` has less
responsibilities and will help with fixing some bugs next.

df280dbbed
2024-05-14 16:08:03 +00:00