Optimize operating_system.rb a bit.

It would be better to stay with --{install-dir,bindir} pair, but this is
currently broken and it does not currently generate documentation:

https://github.com/rubygems/rubygems/issues/1470
This commit is contained in:
Vít Ondruch 2016-02-22 17:01:02 +01:00
parent c40aeb5071
commit 651be7da37
2 changed files with 7 additions and 6 deletions

View File

@ -116,10 +116,10 @@ module Gem
# RubyGems default overrides.
def default_dir
scl_prefix = ENV['X_SCLS'].split(' ').detect {|c| c != '@SCL@'}
scl_prefix = scl_prefix ? scl_prefix + '_': nil
if opt_build_root?
scl_prefix = ENV['X_SCLS'].split(' ').detect {|c| c != '@SCL@'}
scl_prefix = scl_prefix ? scl_prefix + '_': nil
Gem.default_dirs[:"#{scl_prefix}system"][:gem_dir]
elsif Process.uid == 0
Gem.default_dirs[:local][:gem_dir]
@ -134,10 +134,10 @@ module Gem
end
def default_bindir
scl_prefix = ENV['X_SCLS'].split(' ').detect {|c| c != '@SCL@'}
scl_prefix = scl_prefix ? scl_prefix + '_': nil
if opt_build_root?
scl_prefix = ENV['X_SCLS'].split(' ').detect {|c| c != '@SCL@'}
scl_prefix = scl_prefix ? scl_prefix + '_': nil
Gem.default_dirs[:"#{scl_prefix}system"][:bin_dir]
elsif Process.uid == 0
Gem.default_dirs[:local][:bin_dir]

View File

@ -957,6 +957,7 @@ make check TESTS="-v $DISABLE_TESTS"
* Mon Feb 22 2016 Vít Ondruch <vondruch@redhat.com> - 2.3.0-59
- Don't prefix bundling provides.
- Don't enable collections for build.
- Optimize operating_system.rb a bit.
* Fri Feb 19 2016 Pavel Valena <pvalena@redhat.com> - 2.3.0-58
- Fix default_dir and default_bindir