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

ruby-changes:36416

From: nobu <ko1@a...>
Date: Thu, 20 Nov 2014 00:06:24 +0900 (JST)
Subject: [ruby-changes:36416] nobu:r48497 (trunk): common.mk: ims=nil option

nobu	2014-11-20 00:06:04 +0900 (Thu, 20 Nov 2014)

  New Revision: 48497

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

  Log:
    common.mk: ims=nil option
    
    * common.mk (update-gems): use ims=nil option.
    
    * tool/downloader.rb (Downloader.download): show the message if no
      need to download in verbose mode.

  Modified files:
    trunk/common.mk
    trunk/tool/downloader.rb
Index: common.mk
===================================================================
--- common.mk	(revision 48496)
+++ common.mk	(revision 48497)
@@ -893,7 +893,7 @@ update-gems: PHONY https://github.com/ruby/ruby/blob/trunk/common.mk#L893
 	    -I../tool -rdownloader -answ \
 	    -e 'gem, ver = *$$F' \
 	    -e 'gem = "#{gem}-#{ver}.gem"' \
-	    -e 'Downloader::RubyGems.download(gem)' \
+	    -e 'Downloader::RubyGems.download(gem, nil, nil)' \
 	    bundled_gems
 
 UPDATE_LIBRARIES = no
Index: tool/downloader.rb
===================================================================
--- tool/downloader.rb	(revision 48496)
+++ tool/downloader.rb	(revision 48497)
@@ -9,10 +9,6 @@ class Downloader https://github.com/ruby/ruby/blob/trunk/tool/downloader.rb#L9
 
   class RubyGems < self
     def self.download(name, *rest)
-      if File.exist?(name)
-        $stdout.puts "#{name} already exists"
-        return
-      end
       super("https://rubygems.org/downloads/#{name}", name, *rest)
     end
   end
@@ -58,7 +54,13 @@ class Downloader https://github.com/ruby/ruby/blob/trunk/tool/downloader.rb#L54
   #            'UnicodeData.txt', 'enc/unicode/data'
   def self.download(url, name, dir = nil, ims = true)
     file = dir ? File.join(dir, File.basename(name)) : name
-    return true if ims.nil? and File.exist?(file)
+    if ims.nil? and File.exist?(file)
+      if $VERBOSE
+        $stdout.puts "#{name} already exists"
+        $stdout.flush
+      end
+      return true
+    end
     url = URI(url)
     if $VERBOSE
       $stdout.print "downloading #{name} ... "

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

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