ruby-changes:57653
From: Nobuyoshi <ko1@a...>
Date: Sun, 8 Sep 2019 00:23:58 +0900 (JST)
Subject: [ruby-changes:57653] f3bae2c6cf (master): Touch copied cache files to make tarballs stable
https://git.ruby-lang.org/ruby.git/commit/?id=f3bae2c6cf From f3bae2c6cff8eff83114df0e96fd6c338c90ee91 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 8 Sep 2019 00:21:42 +0900 Subject: Touch copied cache files to make tarballs stable diff --git a/tool/make-snapshot b/tool/make-snapshot index 7bdfcd7..cacf971 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -300,7 +300,7 @@ def package(vcs, rev, destdir, tmp = nil) https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L300 rescue SystemCallError end begin - FileUtils.cp_r(file, dest, preserve: true) + FileUtils.cp_r(file, dest) rescue SystemCallError end end @@ -449,10 +449,6 @@ update-gems: https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L449 $(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 end @@ -463,6 +459,13 @@ after-update:: https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L459 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 v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/