[Title]Do not set timeout when waiting success message for uploading package
authordonghyuk.yang <donghyuk.yang@samsung.com>
Thu, 23 Aug 2012 06:28:35 +0000 (15:28 +0900)
committerdonghyuk.yang <donghyuk.yang@samsung.com>
Thu, 23 Aug 2012 06:28:35 +0000 (15:28 +0900)
[Type]
[Module]
[Priority]
[Jira#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

src/build_server/BuildComm.rb
src/pkg_server/client.rb
src/pkg_server/installer.rb

index 4b8e02b31f4a731397751a8c760c4fae0750d322..7d28272b25841e49940598bd749ae1a4326c514a 100644 (file)
@@ -356,14 +356,18 @@ class BuildCommClient
 
 
        # handle 
-       def read_lines
+       def read_lines(enable_timeout = true)
 
                begin
                        # get first line
                        l = nil
-                       timeout(5) do 
-                               l = @socket.gets()
-                       end
+                       if enable_timeout then                  
+                               timeout(5) do 
+                                       l = @socket.gets()
+                               end
+                       else
+                               l = @socket.gets()                                      
+                       end                                     
 
                        if l.nil? then 
                                return false 
index 75a0480c9241a56fc1c11ce589be9b64dddaccca..7b74d00090d8ba1ec35494b22505aee5c0252ea4 100644 (file)
@@ -373,7 +373,7 @@ class Client
               @log.info "Send register message..  [REGISTER|#{dist}|#{binary_list.join("|")}]"
             snapshot = nil
               if client.send "REGISTER|#{dist}|#{binary_list.join("|")}" then
-                output = client.read_lines do |l|
+                output = client.read_lines(false) do |l|
                     line = l.split("|")
                     if line[0].strip == "ERROR" then
                         @log.error l.strip
index 86e6b472e8ad341589b1ed330fa71a9b08d9ae1f..5c6790212f2840778356dc5d23738baa2c5142da 100644 (file)
@@ -71,7 +71,7 @@ class FileInstaller
                 log = log + "##### extract file : #{package_file_path} #####\n"
                 log = log + extract_file(package_name, package_file_path, path, target_path, logger)
                                if not move_dir(package_name, path, target_path, logger) then
-                                       Utils.execute_shell("rm -rf #{path}")
+                                       #Utils.execute_shell("rm -rf #{path}")
                                        return false
                                end