From: Gordon Hecker Date: Thu, 11 Mar 2010 08:58:51 +0000 (+0100) Subject: cleanup: use standard io library for logfiles X-Git-Tag: e2factory-2.3.4rc1~4 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=1d6ce69bb1b58bda6ae5eb0231491898267357cf;p=e2factory.git cleanup: use standard io library for logfiles Signed-off-by: Gordon Hecker --- diff --git a/local/e2build.lua b/local/e2build.lua index c74ad44..82af139 100644 --- a/local/e2build.lua +++ b/local/e2build.lua @@ -370,7 +370,10 @@ function runbuild(info, r, return_flags) if not rc then return false, e:cat(re) end - local out = luafile.open(res.build_config.buildlog, "w") + local out, msg = io.open(res.build_config.buildlog, "w") + if not out then + return false, e:cat(msg) + end local function logto(output) e2lib.log(3, output) out:write(output) diff --git a/local/e2tool.lua b/local/e2tool.lua index c4b8ec6..44d1182 100644 --- a/local/e2tool.lua +++ b/local/e2tool.lua @@ -48,9 +48,7 @@ require("url") require("hash") require("lock") require("e2util") -require("luafile_ll") require("e2option") -require("luafile") require("generic_git") require("policy") @@ -272,10 +270,10 @@ function opendebuglogfile(info) end local logfile = info.root .. "/log/debug.log" local rc, re = e2lib.rotate_log(logfile) - local debuglogfile, re = luafile.open(logfile, "w") + local debuglogfile, msg = io.open(logfile, "w") if not debuglogfile then local e = new_error("error opening debug logfile") - return false, e:cat(re) + return false, e:append(msg) end e2lib.globals.debuglogfile = debuglogfile return true, nil