From 5522d79803766d715c37a7826e079b1c05c11e59 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 27 Jun 2017 17:10:56 +0000 Subject: downloader.rb: get rid of symlinks * tool/downloader.rb: do not save downloaded files to cache. [ruby-core:81780] [Bug #13684] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/make-snapshot | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tool/make-snapshot') diff --git a/tool/make-snapshot b/tool/make-snapshot index 0e467894d9..983fa2ccef 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -208,8 +208,13 @@ def package(vcs, rev, destdir, tmp = nil) FileUtils.mkpath(File.dirname(dest)) begin FileUtils.ln(file, dest, force: true) + next unless File.symlink?(dest) + File.unlink(dest) + rescue SystemCallError + end + begin + FileUtils.cp_r(file, dest, preserve: true) rescue SystemCallError - FileUtils.cp(file, dest, preserve: true) end end end @@ -334,11 +339,10 @@ def package(vcs, rev, destdir, tmp = nil) mk << <<-'APPEND' prereq: clean-cache $(CLEAN_CACHE) -clean-cache $(CLEAN_CACHE): after-update +clean-cache $(CLEAN_CACHE): extract-gems touch-unicode-files: update-download:: touch-unicode-files update-download:: update-gems -after-update:: extract-gems extract-gems: update-gems update-gems: APPEND @@ -346,6 +350,7 @@ update-gems: f.puts "prereq: update-download" f.puts mk end + ENV["CACHE_SAVE"] = "no" system(ENV["MAKE"] || ENV["make"] || "make", "prereq", *args.map {|arg| arg.join("=")}) clean.push("rbconfig.rb", ".rbconfig.time", "enc.mk") print "prerequisites" -- cgit v1.2.3