[Title] chagne copy to ln
authorhyoun jiil <jiil.hyoun@samsung.com>
Mon, 25 Mar 2013 10:04:50 +0000 (19:04 +0900)
committerhyoun jiil <jiil.hyoun@samsung.com>
Mon, 25 Mar 2013 10:04:50 +0000 (19:04 +0900)
[Type] Enhancement
[Module] Toolchain /
[Priority] Minor
[Jira#]
[Redmine#] 8852
[Problem]
[Cause]
[Solution]
[TestCase]

Change-Id: Ib69f21b93c6356111366f2e5446c1d165bec5b51

src/build_server/BuildJob.rb
src/build_server/RegisterPackageJob.rb
src/builder/Builder.rb
src/common/BuildComm.rb
src/pkg_server/packageServer.rb

index 8d9c8e4d73600653295e903e2287253985d69e6f..490c93b6f9f257853bd5f04e420b61973ccea5af 100644 (file)
@@ -815,7 +815,7 @@ class BuildJob < CommonJob
                                        base_package_name= File.basename(local_path, "#{cos}#{ext}")
                                        @log.info( "Copying compatible package:#{local_path}", Log::LV_USER)
                                        @log.info( "Creating package file ... #{base_package_name}#{@os}#{ext}", Log::LV_USER)
-                                       FileUtils.cp local_path, "#{@source_path}/#{base_package_name}#{@os}#{ext}"
+                                       FileUtils.ln local_path, "#{@source_path}/#{base_package_name}#{@os}#{ext}", :force => true
                                else
                                        @log.info( "Downloading compatible package:#{pkg_name}(#{cos})", Log::LV_USER)
                                        loc = @pkgsvr_client.download(pkg_name, cos, false)
@@ -1064,7 +1064,7 @@ class BuildJob < CommonJob
 
                binpkg_path_list.each do |file|
                        @log.info( " * #{file}", Log::LV_USER)
-                       FileUtils.cp(file,"#{dst_path}/")
+                       FileUtils.ln(file,"#{dst_path}/", :force => true)
                end
 
                return true
@@ -1077,7 +1077,7 @@ class BuildJob < CommonJob
 
                @log.info( "Copying log to #{outgoing_dir}", Log::LV_USER)
                file = "#{@source_path}/../log"
-               FileUtils.copy_file(file, "#{outgoing_dir}/remote_log")
+               FileUtils.ln(file, "#{outgoing_dir}/remote_log",:force => true)
 
                # copy result files, if not reverse build
                if not @is_rev_build_check_job then
index 53f91044e755e9141c9ade5283c95b12d886049d..7045466a1af91129110fc76e1c20acf7a54941ec 100644 (file)
@@ -159,7 +159,7 @@ class RegisterPackageJob < CommonJob
                                FileUtils.mv(@local_path, @file_path)
                                FileUtils.rm_rf("#{File.dirname(@local_path)}")
                        else
-                               FileUtils.cp(@local_path, @file_path)
+                               FileUtils.ln(@local_path, @file_path, :force => true)
                        end
                end
 
@@ -401,7 +401,7 @@ class RegisterPackageJob < CommonJob
                                # make new package file for compatible OS
                                newfile = "#{@pkg_name}_#{@pkg_version}_#{os}.zip"
                                @log.info( "Copying #{@filename} to #{newfile}" )
-                               FileUtils.cp(@file_path,"#{@source_path}/#{newfile}")
+                               FileUtils.ln(@file_path,"#{@source_path}/#{newfile}",:force => true)
 
                                # reverse check
                                if not @no_reverse then
index 5774c31476e2726db109983a0be5a498607fbb5f..b3c63853cfac3602b97d0202af323fc3f8bb6e9a 100644 (file)
@@ -585,7 +585,7 @@ VERSION=\"#{version}\" "
                                return true
                        end
 
-                       FileUtils.cp(src, tar)
+                       FileUtils.ln(src, tar,:force => true)
                end
 
                return true
@@ -644,7 +644,7 @@ VERSION=\"#{version}\" "
                                return true
                        end
 
-                       FileUtils.cp(src, tar)
+                       FileUtils.ln(src, tar,:force => true)
                end
                return true
        end
index 2f3817b417932b462e9f16f59413f563908abd08..3ca92fd992bebd3bddba7211ce6b7e02e8102683 100644 (file)
@@ -296,7 +296,7 @@ class BuildCommServer
 
                                # if hit , touch and copy
                                FileUtils.touch cache_file
-                               FileUtils.copy_file(cache_file, dst_file)
+                               FileUtils.ln(cache_file, dst_file, :force => true)
 
                                found = true
                        end
@@ -322,7 +322,7 @@ class BuildCommServer
                cache_file = "#{@cache_dir}/#{file_name}"
                @download_cache_mutex.synchronize do
                        # copy & touch
-                       FileUtils.copy_file(dst_file, cache_file)
+                       FileUtils.ln(dst_file, cache_file, :force => true)
                        FileUtils.touch cache_file
                end
        end
index 5c803b4d38d9be81f4f150a7f1fbfadeed86829f..2082c0de19b367f8e941d52085b869becf2cd89c 100644 (file)
@@ -203,9 +203,9 @@ class PackageServer
                # move file to package server
                binary_pkg_file_path_list.each do |l|
                        if test_flag then
-                               FileUtils.copy_file( l, "#{distribution.location}/temp/#{File.basename(l)}" )
+                               FileUtils.ln( l, "#{distribution.location}/temp/#{File.basename(l)}", :force => true )
                        else
-                               FileUtils.copy_file( l, "#{distribution.location}/binary/#{File.basename(l)}" )
+                               FileUtils.ln( l, "#{distribution.location}/binary/#{File.basename(l)}", :force => true )
                        end
                end