From f3bae2c6cff8eff83114df0e96fd6c338c90ee91 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 8 Sep 2019 00:21:42 +0900 Subject: Touch copied cache files to make tarballs stable --- tool/make-snapshot | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tool/make-snapshot') diff --git a/tool/make-snapshot b/tool/make-snapshot index 7bdfcd7842..cacf97199a 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -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| -- cgit v1.2.3