]> git.e2factory.org Git - e2factory.git/commitdiff
cleanup: use standard io library for logfiles
authorGordon Hecker <gh@emlix.com>
Thu, 11 Mar 2010 08:58:51 +0000 (09:58 +0100)
committerGordon Hecker <gh@emlix.com>
Thu, 11 Mar 2010 09:00:11 +0000 (10:00 +0100)
Signed-off-by: Gordon Hecker <gh@emlix.com>
local/e2build.lua
local/e2tool.lua

index c74ad449c2dfb96aac385817a2227338d93426b6..82af1395c6ed9cfd187fdceefe1e9f4787974b14 100644 (file)
@@ -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)
index c4b8ec6c60c5acb90033b50ce6ed50d10026d5bc..44d1182223289216695407c4aca7cb1f6d43a0a0 100644 (file)
@@ -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