Hi,

The following diff is a backport of
https://github.com/luakit/luakit/commit/4b22c18d5eb5594136091b7b615dc8f9ded0e32f
commit in order to avoid using rm(1) process to remove a file, but use
os.remove() lua function.

It permits to me to remove a spawn call whereas I am looking to
properly unveil(2) luakit process.

Comments or OK ?
-- 
Sebastien Marie

diff 4bae7f609ba05ed86c7d87ec356d8a21321aaaf2 /home/semarie/repos/openbsd/ports
blob - 94524d60b60ed3f4999018ff3edd4310c0c9b8ab
file + www/luakit/Makefile
--- www/luakit/Makefile
+++ www/luakit/Makefile
@@ -7,7 +7,7 @@ COMMENT =       fast, small, webkit based browser written in
 GH_ACCOUNT =   luakit
 GH_TAGNAME =   2.2
 GH_PROJECT =   luakit
-REVISION =     0
+REVISION =     1
 
 EPOCH =                1
 
blob - /dev/null
file + www/luakit/patches/patch-lib_session_lua
--- www/luakit/patches/patch-lib_session_lua
+++ www/luakit/patches/patch-lib_session_lua
@@ -0,0 +1,36 @@
+$OpenBSD$
+Use os.remove() instead of spawning rm(1) process.
+
+Backport 
https://github.com/luakit/luakit/commit/4b22c18d5eb5594136091b7b615dc8f9ded0e32f
+Index: lib/session.lua
+--- lib/session.lua.orig
++++ lib/session.lua
+@@ -19,10 +19,6 @@ local _M = {}
+ 
+ lousy.signal.setup(_M, true)
+ 
+-local function rm(file)
+-    luakit.spawn(string.format("rm %q", file))
+-end
+-
+ --- Path to session file.
+ -- @type string
+ -- @readwrite
+@@ -82,7 +78,7 @@ _M.save = function (file)
+         io.close(fh)
+         os.rename(tempfile, file)
+     else
+-        rm(file)
++        os.remove(file)
+     end
+ end
+ 
+@@ -220,7 +216,7 @@ window.add_signal("init", function (w)
+         local num_windows = #lousy.util.table.values(window.bywidget)
+         -- Remove the recovery session on a successful exit
+         if num_windows == 0 and os.exists(_M.recovery_file) then
+-            rm(_M.recovery_file)
++            os.remove(_M.recovery_file)
+         end
+     end)
+ 

Reply via email to