ruby-changes:61153
From: Nobuyoshi <ko1@a...>
Date: Sat, 9 May 2020 01:25:25 +0900 (JST)
Subject: [ruby-changes:61153] 3333d02357 (master): rbinstall.rb: get rid of installing duplicate files
https://git.ruby-lang.org/ruby.git/commit/?id=3333d02357 From 3333d0235723c8c201ad67ed20c6af22d7923765 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 9 May 2020 01:22:16 +0900 Subject: rbinstall.rb: get rid of installing duplicate files Should not overwrite ext/rubyvm/lib/forwardable/impl.rb by lib/forwardable/impl.rb. diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 9471886..c91d4ff 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -39,6 +39,7 @@ def parse_args(argv = ARGV) https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L39 $make = 'make' $mflags = [] $install = [] + $installed = {} $installed_list = nil $exclude = [] $dryrun = false @@ -170,9 +171,12 @@ def install(src, dest, options = {}) https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L171 options = options.clone strip = options.delete(:strip) options[:preserve] = true + srcs = Array(src).select {|s| !$installed[$made_dirs[dest] ? File.join(dest, s) : dest]} + return if srcs.empty? + src = srcs if Array === src d = with_destdir(dest) super(src, d, **options) - srcs = Array(src) + srcs.each {|s| $installed[$made_dirs[dest] ? File.join(dest, s) : dest] = true} if strip d = srcs.map {|s| File.join(d, File.basename(s))} if $made_dirs[dest] strip_file(d) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/