fixed errors
This commit is contained in:
@@ -54,7 +54,6 @@ class MockManager
|
||||
end
|
||||
|
||||
def clean_build
|
||||
@log.info("Удаление временной сборочной среды #{@path}")
|
||||
FileUtils.rm_rf(@path)
|
||||
end
|
||||
|
||||
@@ -222,7 +221,7 @@ class MockManager
|
||||
FileUtils.mkdir_p(File.join(@resultpath, "#{@build_id}"))
|
||||
if File.exist?(@process_log)
|
||||
dst = File.join(@resultpath, "#{@build_id}")
|
||||
FileUtils.cp_r(@process_log, dst, verbose: true, remove_destination: true)
|
||||
FileUtils.cp_r(@process_log, dst, verbose: false, remove_destination: true)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -231,6 +230,7 @@ class MockManager
|
||||
@db.before_fork
|
||||
spock = Spork.spork(:logger => log) do
|
||||
@db.after_fork
|
||||
old_stdout = $stdout.dup
|
||||
$stdout = File.open(@process_log, "w")
|
||||
@log = Logger.new($stdout)
|
||||
if @spec == ""
|
||||
@@ -246,11 +246,13 @@ class MockManager
|
||||
save_logs
|
||||
save_rpms if @error == false
|
||||
rescue => e
|
||||
@error = true
|
||||
puts e
|
||||
end
|
||||
$stdout = old_stdout
|
||||
@log.close
|
||||
save_prg_log
|
||||
clean_build
|
||||
@log.close
|
||||
if @error
|
||||
@db.update_build_task_status(@build_id, 1)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user