ruby-changes:46784
From: nobu <ko1@a...>
Date: Fri, 26 May 2017 16:02:57 +0900 (JST)
Subject: [ruby-changes:46784] nobu:r58900 (trunk): runruby.rb: no PRELOAD on multiarch [ci skip]
nobu 2017-05-26 16:02:51 +0900 (Fri, 26 May 2017) New Revision: 58900 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58900 Log: runruby.rb: no PRELOAD on multiarch [ci skip] * tool/runruby.rb: do not set environment to preload on multiarch platforms, otherwise other external commands (e.g., /bin/sh) fail to run. Modified files: trunk/tool/runruby.rb Index: tool/runruby.rb =================================================================== --- tool/runruby.rb (revision 58899) +++ tool/runruby.rb (revision 58900) @@ -70,8 +70,8 @@ config["bindir"] = abs_archdir https://github.com/ruby/ruby/blob/trunk/tool/runruby.rb#L70 env = {} runner = File.join(abs_archdir, "ruby-runner#{config['EXEEXT']}") -runner = File.expand_path(ruby) unless File.exist?(runner) -env["RUBY"] = runner +runner = nil unless File.exist?(runner) +env["RUBY"] = runner || File.expand_path(ruby) env["PATH"] = [abs_archdir, ENV["PATH"]].compact.join(File::PATH_SEPARATOR) if e = ENV["RUBYLIB"] @@ -84,12 +84,14 @@ if File.file?(libruby_so) https://github.com/ruby/ruby/blob/trunk/tool/runruby.rb#L84 if e = config['LIBPATHENV'] and !e.empty? env[e] = [abs_archdir, ENV[e]].compact.join(File::PATH_SEPARATOR) end - if e = config['PRELOADENV'] - e = nil if e.empty? - e ||= "LD_PRELOAD" if /linux/ =~ RUBY_PLATFORM - end - if e - env[e] = [libruby_so, ENV[e]].compact.join(File::PATH_SEPARATOR) + unless runner + if e = config['PRELOADENV'] + e = nil if e.empty? + e ||= "LD_PRELOAD" if /linux/ =~ RUBY_PLATFORM + end + if e + env[e] = [libruby_so, ENV[e]].compact.join(File::PATH_SEPARATOR) + end end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/