1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

make-snapshot: copy cache files instead of linking

To get rid of setting mode and mtime of the original cache files.
This commit is contained in:
Nobuyoshi Nakada 2019-10-03 16:47:57 +09:00
parent b7ae26e2ee
commit 47d143be17
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -288,14 +288,9 @@ def package(vcs, rev, destdir, tmp = nil)
puts "copying #{file}"
dest = exported + file[$srcdir.size..-1]
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)
FileUtils.chmod_R("u=rwX,go=rX", dest)
rescue SystemCallError
end
end