[前][次][番号順一覧][スレッド一覧]

ruby-changes:35985

From: nobu <ko1@a...>
Date: Tue, 21 Oct 2014 13:27:17 +0900 (JST)
Subject: [ruby-changes:35985] nobu:r48067 (trunk): make-snapshot: download by after-update

nobu	2014-10-21 12:33:18 +0900 (Tue, 21 Oct 2014)

  New Revision: 48067

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48067

  Log:
    make-snapshot: download by after-update
    
    * tool/make-snapshot (package): download config files, bundled
      gems, and Unicode data by after-update.

  Modified files:
    trunk/tool/make-snapshot
Index: tool/make-snapshot
===================================================================
--- tool/make-snapshot	(revision 48066)
+++ tool/make-snapshot	(revision 48067)
@@ -217,15 +217,6 @@ def package(rev, destdir) https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L217
   "take a breath, and go ahead".scan(/./) {|c|print c; sleep(c == "," ? 0.7 : 0.05)}; puts
   def (clean = []).add(n) push(n); n end
   Dir.chdir(v) do
-    %w[config.guess config.sub].each do |conf|
-      next if File.exist?("tool/#{conf}")
-      begin
-        require File.expand_path("downloader", $tooldir)
-      rescue LoadError
-        abort "Error!!! Copy 'downloader.rb' from 'tool' directory of the recent ruby repository!"
-      end
-      Downloader::GNU.download(conf, "tool")
-    end
     File.open(clean.add("cross.rb"), "w") do |f|
       f.puts "Object.__send__(:remove_const, :CROSS_COMPILING) if defined?(CROSS_COMPILING)"
       f.puts "CROSS_COMPILING=true"
@@ -266,26 +257,19 @@ def package(rev, destdir) https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L257
       FileUtils.mkpath(hdrdir = "#{extout}/include/ruby")
       File.open("#{hdrdir}/config.h", "w") {}
       miniruby = ENV['MINIRUBY'] + " -r./cross"
-      IO.popen("make -f - prereq"\
+      mk = IO.read("Makefile.in").gsub(/^@.*\n/, '').gsub(/@([A-Za-z_]\w*)@/) {ENV[$1]}
+      mk << commonmk.gsub(/\{[^{}]*\}/, "")
+      IO.popen("make -f - #{mk[/^after-update/]} prereq"\
                " srcdir=. CHDIR=cd PATH_SEPARATOR='#{File::PATH_SEPARATOR}'"\
                " IFCHANGE=tool/ifchange MAKEDIRS='mkdir -p'"\
                " 'MINIRUBY=#{miniruby}' 'RUBY=#{ENV["RUBY"]}'", "w") do |f|
-        f.puts(IO.read("Makefile.in").gsub(/^@.*\n/, '').gsub(/@([A-Za-z_]\w*)@/) {ENV[$1]})
-        f.puts(commonmk.gsub(/\{[^{}]*\}/, ""))
+        f.puts mk
       end
       clean.push("rbconfig.rb", ".rbconfig.time", "enc.mk")
       print "prerequisites"
     else
       system("#{YACC} -o parse.c parse.y")
     end
-    if File.file?('gems/bundled_gems') && bundled_gems = File.read('gems/bundled_gems')
-      bundled_gems.split("\n").map(&:split).each do |gem, ver|
-        gem_name = "#{gem}-#{ver}.gem"
-        unless File.file?("gems/#{gem_name}")
-          Downloader::RubyGems.download(gem_name, "gems")
-        end
-      end
-    end
     FileUtils.rm_rf(clean)
     unless $?.success?
       puts " failed"

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]