ruby-changes:69991
From: David <ko1@a...>
Date: Tue, 30 Nov 2021 20:54:22 +0900 (JST)
Subject: [ruby-changes:69991] d7f6cb0f78 (master): [rubygems/rubygems] Revert "Remove spec file before building"
https://git.ruby-lang.org/ruby.git/commit/?id=d7f6cb0f78 From d7f6cb0f780a5a48b5d4a937f93d876a90697fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Thu, 25 Feb 2021 17:06:01 +0100 Subject: [rubygems/rubygems] Revert "Remove spec file before building" This reverts commit af604436d8141c34cb2e1e645b9b0d47bfd55a55. The issue that led to introducing it was never reproduced. I tried to repro with this patch and it still works just fine. Since this removal is getting in the middle for some race conditions I'm facing, I'm reverting the patch. https://github.com/rubygems/rubygems/commit/2dd267f0e4 --- lib/rubygems/installer.rb | 2 -- test/rubygems/test_gem_installer.rb | 3 --- 2 files changed, 5 deletions(-) diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 10341a9398c..38642ee8ef4 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -293,8 +293,6 @@ class Gem::Installer https://github.com/ruby/ruby/blob/trunk/lib/rubygems/installer.rb#L293 def install pre_install_checks - FileUtils.rm_f File.join gem_home, 'specifications', spec.spec_name - run_pre_install_hooks # Set loaded_from to ensure extension_dir is correct diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb index 77652909c17..8874577aa8a 100644 --- a/test/rubygems/test_gem_installer.rb +++ b/test/rubygems/test_gem_installer.rb @@ -948,7 +948,6 @@ gem 'other', version https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_installer.rb#L948 Gem.pre_install do assert_path_not_exist cache_file, 'cache file must not exist yet' - assert_path_not_exist spec_file, 'spec file must not exist yet' true end @@ -956,13 +955,11 @@ gem 'other', version https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_installer.rb#L955 assert_path_exist gemdir, 'gem install dir must exist' assert_path_exist rakefile, 'gem executable must exist' assert_path_not_exist stub_exe, 'gem executable must not exist' - assert_path_not_exist spec_file, 'spec file must not exist yet' true end Gem.post_install do assert_path_exist cache_file, 'cache file must exist' - assert_path_exist spec_file, 'spec file must exist' end @newspec = nil -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/