[Title] Fixed bugs that are found by checking ruby1.9.1
authordonghee yang <donghee.yang@samsung.com>
Wed, 17 Oct 2012 01:37:30 +0000 (10:37 +0900)
committerdonghee yang <donghee.yang@samsung.com>
Wed, 17 Oct 2012 01:37:30 +0000 (10:37 +0900)
src/build_server/GitBuildJob.rb
src/build_server/ProjectManager.rb
src/build_server/SocketJobRequestListener.rb

index 306995fbe89a5f49f111bbef29f10d9801b951c8..abbb10b347c6c09647a5834b13f899ff34af999d 100644 (file)
@@ -270,7 +270,7 @@ class GitBuildJob < BuildJob
                end
 
                # copy to source path
-               FileUtils.cp_r(git_path, @source_path)
+               Utils.execute_shell_return( "cp -r #{git_path} #{@source_path}" )
 
                return @git_commit
        end
index df64083cdeaff0c0f417dc0efe88d38a818213c9..2fb36a3005794427b2f5ce47c2db914219b79dda 100644 (file)
@@ -266,7 +266,7 @@ class ProjectManager
                                db.do "INSERT INTO projects (name,type,password,dist_name) VALUES('#{prj.name}', '#{prj.type}', '#{prj.passwd}', '#{prj.dist_name}')"
 
                                # OS
-                               prj_id = db.select_one("select last_insert_rowid()")
+                               prj_id = db.select_one("select last_insert_rowid()")[0]
                                prj.os_list.each { |os|
                                        db.do "INSERT INTO project_os VALUES('#{prj_id}','#{os}')"
                                }
@@ -311,7 +311,6 @@ class ProjectManager
                                        prj_os_list.push row2[0]
                                }
                                rs2.finish
-
                                if prj_type == "GIT" then
                                        new_project = GitBuildProject.new(prj_name, @server, prj_os_list, prj_dist)
                                else
index 6c98a2a9322a86e7af3d2c3adc43e30afbd40dc2..db3546dfeed76f9addb2b8596d31922797058810 100644 (file)
@@ -217,7 +217,6 @@ class SocketJobRequestListener
                                raise "Unsupported OS name is used!"
                        end
                end
-
                # multi build job
                if project_name_list.count > 1 or os_list.count > 1 then
                        new_job_list = []
@@ -351,7 +350,7 @@ class SocketJobRequestListener
                        end
 
                        # check os
-                       os_list = check_supported_os( os , req )
+                       os_list = check_supported_os( [os] , req )
                        if os_list.nil? or os_list.empty? then
                                raise "Unsupported OS name is used!"
                        end