From: Gordon Hecker Date: Tue, 10 Nov 2009 13:51:50 +0000 (+0100) Subject: build: rotate build logfiles X-Git-Tag: e2factory-2.3.3rc1~18 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=2008c68128592edb893ef3fdc5ebf9e602fcc72f;p=e2factory.git build: rotate build logfiles Signed-off-by: Gordon Hecker --- diff --git a/Changelog b/Changelog index 81c7db9..83d069b 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,7 @@ NEXT: * use sha1 module instead of calling the sha1sum tool * optimization: use stat() instead of calling 'test -f' + * rotate build logfiles e2factory-2.3.2 * temporary build directories are located in a version specific directory diff --git a/local/e2build.lua b/local/e2build.lua index 4929980..0707586 100644 --- a/local/e2build.lua +++ b/local/e2build.lua @@ -30,13 +30,6 @@ e2build = e2lib.module("e2build") -function e2build.remove_logfile(info, r, return_flags) - local res = info.results[r] - local rc = os.remove(res.build_config.buildlog) - -- always return true - return true, nil -end - --- cache a result -- @param info -- @param server @@ -372,6 +365,10 @@ function e2build.runbuild(info, r, return_flags) res.build_config.chroot_call_prefix, e2_su, res.build_config.base, runbuild) -- the build log is written to an external logfile + rc, re = e2lib.rotate_log(res.build_config.buildlog) + if not rc then + return false, e:cat(re) + end local out = luafile.open(res.build_config.buildlog, "w") local function logto(output) e2lib.log(3, output) diff --git a/local/policy.lua b/local/policy.lua index 9e900a0..9fdbd91 100644 --- a/local/policy.lua +++ b/local/policy.lua @@ -221,7 +221,6 @@ end local default_build_process = { "build_config", "result_available", - "remove_logfile", "chroot_lock", "chroot_cleanup_if_exists", "setup_chroot",