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)
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
@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
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
# 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
return true
end
- FileUtils.cp(src, tar)
+ FileUtils.ln(src, tar,:force => true)
end
return true
return true
end
- FileUtils.cp(src, tar)
+ FileUtils.ln(src, tar,:force => true)
end
return true
end
# 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
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
# 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