mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Touch copied cache files to make tarballs stable
This commit is contained in:
parent
5a6954ba74
commit
f3bae2c6cf
1 changed files with 8 additions and 5 deletions
|
@ -300,7 +300,7 @@ def package(vcs, rev, destdir, tmp = nil)
|
|||
rescue SystemCallError
|
||||
end
|
||||
begin
|
||||
FileUtils.cp_r(file, dest, preserve: true)
|
||||
FileUtils.cp_r(file, dest)
|
||||
rescue SystemCallError
|
||||
end
|
||||
end
|
||||
|
@ -448,10 +448,6 @@ extract-gems: update-gems
|
|||
update-gems:
|
||||
$(UNICODE_SRC_DATA_DIR)/.unicode-tables.time:
|
||||
touch-unicode-files:
|
||||
APPEND
|
||||
mk << <<-APPEND
|
||||
after-update::
|
||||
\t$(Q) $(RUNRUBY) -C gems -e 'Dir.glob("*") {|f|File.rename(File.readlink(f), f) rescue nil}'
|
||||
APPEND
|
||||
open(clean.add("Makefile"), "w") do |f|
|
||||
f.puts mk
|
||||
|
@ -463,6 +459,13 @@ after-update::
|
|||
args = args.map {|arg| arg.join("=")}
|
||||
system(make, "update-download", *args)
|
||||
clean.push("rbconfig.rb", ".rbconfig.time", "enc.mk", "ext/ripper/y.output", ".revision.time")
|
||||
Dir.glob("**/*") do |dest|
|
||||
next unless File.symlink?(dest)
|
||||
orig = File.expand_path(File.readlink(dest), File.dirname(dest))
|
||||
File.unlink(dest)
|
||||
FileUtils.cp_r(orig, dest)
|
||||
end
|
||||
File.utime(modified, modified, *Dir.glob(["tool/config.{guess,sub}", "gems/*.gem", "tool"]))
|
||||
if modified
|
||||
new_time = modified + 2
|
||||
touch_all(new_time, "**/*", File::FNM_DOTMATCH) do |name, stat|
|
||||
|
|
Loading…
Reference in a new issue