]> git.e2factory.org Git - e2factory.git/commitdiff
Lock all modules and plugins with strict.lock()
authorTobias Ulmer <tu@emlix.com>
Tue, 4 Sep 2012 12:11:07 +0000 (14:11 +0200)
committerTobias Ulmer <tu@emlix.com>
Tue, 26 Feb 2013 18:07:10 +0000 (19:07 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
21 files changed:
generic/cache.lua
generic/e2option.lua
generic/err.lua
generic/generic_git.lua
generic/hash.lua
generic/lock.lua
generic/luafile.lua
generic/tools.lua
generic/transport.lua
generic/url.lua
global/e2-create-project.lua
global/e2-fetch-project.lua
global/e2-install-e2.lua
local/cvs.lua
local/e2build.lua
local/e2tool.lua
local/environment.lua
local/files.lua
local/git.lua
local/policy.lua
local/svn.lua

index 0ea6895dd52d733c58882b4330b06d8ff030e1d4..42603472fa58633ea21884154e626fdb83f57e64 100644 (file)
@@ -30,6 +30,7 @@ local e2lib = require("e2lib")
 local transport = require("transport")
 local url = require("url")
 local err = require("err")
+local strict = require("strict")
 
 --- cache
 -- @class table
@@ -502,6 +503,6 @@ function cache.set_writeback(c, server, value)
     return true, nil
 end
 
-return cache
+return strict.lock(cache)
 
 -- vim:sw=4:sts=4:et:
index 5893a6321987f053f1d4ae4793e40229d612cb08..6a054688028a0eb844ddd41e7c179963448f8b7d 100644 (file)
@@ -32,6 +32,7 @@ local e2lib = require("e2lib")
 require("e2util")
 local plugin = require("plugin")
 local err = require("err")
+local strict = require("strict")
 
 local options = {}
 local aliases = {}
@@ -39,6 +40,8 @@ local optionlist = {} -- ordered list of option names
 
 e2option.documentation = "<no documentation available>"
 
+e2option.opts = {}
+
 --- register a flag option
 -- @param name string: option name
 -- @param doc string: documentation string
@@ -387,6 +390,6 @@ Type e2 --licence for more information.
     e2lib.finish(rc)
 end
 
-return e2option
+return strict.lock(e2option)
 
 -- vim:sw=4:sts=4:et:
index c2075eec59cc3e4a065935a77568b1c874e3940b..4fdc0f93dadbc6dd2bd8c08108ecfabbbf861dd3 100644 (file)
@@ -27,6 +27,7 @@
 
 local err =  {}
 local e2lib = require("e2lib")
+local strict = require("strict")
 
 --- append a string to an error object
 -- @param format string: format string
@@ -114,6 +115,6 @@ function err.toerror(x)
     end
 end
 
-return err
+return strict.lock(err)
 
 -- vim:sw=4:sts=4:et:
index 49e7f6a2bbc79e7ba398bffa32c49f2e46ee7e6c..5062d76541ae661035598ee83eeb2a624d84aeee 100644 (file)
 -- take server / location
 
 local generic_git = {}
+local e2lib = require("e2lib")
 local cache = require("cache")
 local url = require("url")
 local tools = require("tools")
 local err = require("err")
-local e2lib = require("e2lib")
+local strict = require("strict")
 
 --- clone a git repository
 -- @param surl url to the server
@@ -621,6 +622,6 @@ function generic_git.new_repository(c, lserver, llocation, rserver, rlocation, f
     return true, nil
 end
 
-return generic_git
+return strict.lock(generic_git)
 
 -- vim:sw=4:sts=4:et:
index df1be7948edd6d726eb264d499d51cafb23a7395..30f2908ece2a8d73de10eab42e9fdb7aad383452 100644 (file)
@@ -27,8 +27,9 @@
 ]]
 
 local hash = {}
-require("sha1")
 local err = require("err")
+local strict = require("strict")
+require("sha1")
 
 --- create a hash context
 -- @return a hash context object, or nil on error
@@ -121,6 +122,6 @@ function hash.hash_finish(hc)
     return cs
 end
 
-return hash
+return strict.lock(hash)
 
 -- vim:sw=4:sts=4:et:
index 726500754c6203f21cc8627b73e03985597f1f19..c1f299b90a1c1c91108197ba029967c69cd9d571 100644 (file)
@@ -32,6 +32,7 @@
 local lock = {}
 local err = require("err")
 local e2lib = require("e2lib")
+local strict = require("strict")
 
 --- create a new lock context
 -- @return table: the lock context
@@ -119,6 +120,6 @@ if test then
 end
 ]]
 
-return lock
+return strict.lock(lock)
 
 -- vim:sw=4:sts=4:et:
index 537d9e6e10bab7712a11305bfecbcf35a5dea4d5..592cdd327f2835a73d74bc8a44f1f4da0c772e89 100644 (file)
@@ -26,6 +26,7 @@
 ]]
 
 local luafile = {}
+local strict = require("strict")
 require("luafile_ll")
 
 function luafile.new()
@@ -137,6 +138,6 @@ function luafile.dup2(oldfd, newfd)
     return nil
 end
 
-return luafile
+return strict.lock(luafile)
 
 -- vim:sw=4:sts=4:et:
index 2455cc977945584bc8aa9826b36e9768ea089f5f..49c7079eb215d72a274e4b7b6c5e351b4a980c4f 100644 (file)
@@ -27,6 +27,7 @@
 
 local tools = {}
 local e2lib = require("e2lib")
+local strict = require("strict")
 require("buildconfig")
 
 local toollist = {
@@ -183,6 +184,6 @@ function tools.init()
     return true, nil
 end
 
-return tools
+return strict.lock(tools)
 
 -- vim:sw=4:sts=4:et:
index 2c2910580fb10f7e9da94e0efc32f73c449c113d..cef88dcf8e0c797594e3d6f1954616856a6e70c9 100644 (file)
 ]]
 
 local transport = {}
+local e2lib = require("e2lib")
 local url = require("url")
 local tools = require("tools")
 local err = require("err")
-local e2lib = require("e2lib")
+local strict = require("strict")
 
 --- call rsync with appropriate rsh argument according to the tools
 -- configuration
@@ -360,6 +361,6 @@ function transport.file_path(surl, location)
     return path
 end
 
-return transport
+return strict.lock(transport)
 
 -- vim:sw=4:sts=4:et:
index a2eebbe5d5bffb7d462d5ed1932864efcbb260f2..fee66080ebaa641d4f3631e5b362d0013fdff256 100644 (file)
@@ -26,6 +26,7 @@
 ]]
 
 local url = {}
+local strict = require("strict")
 
 --- parse
 -- @param url the url to parse
@@ -75,6 +76,6 @@ function url.parse(url)
     return u, nil
 end
 
-return url
+return strict.lock(url)
 
 -- vim:sw=4:sts=4:et:
index 115e2b7424105ae98c3ee9c465f38f41c1c8f9b6..5d781182638a41169ad0e4d253c3382d9b3d4604 100644 (file)
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ]]
 
-require("buildconfig")
 local e2lib = require("e2lib")
 local cache = require("cache")
 local generic_git = require("generic_git")
 local err = require("err")
 local e2option = require("e2option")
+require("buildconfig")
 
 e2lib.init()
 
index 6cdf25f83c33fceccded821f13c8fb33ed8cb7de..7d502cbd6d246b809f952cec792b47b9b46769c0 100644 (file)
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ]]
 
-require("buildconfig")
 local e2lib = require("e2lib")
 local e2option = require("e2option")
 local generic_git = require("generic_git")
 local cache = require("cache")
 local err = require("err")
+require("buildconfig")
 
 e2lib.init()
 local e = err.new("fetching project failed")
index ffd1f4a16864ac3955af1d5ee3aa67579d556bda..0720c06b517c1cdfa16e21e1d9861022ef6eaca5 100644 (file)
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ]]
 
-require("buildconfig")
 local e2lib = require("e2lib")
 local e2option = require("e2option")
 local generic_git = require("generic_git")
 local err = require("err")
+require("buildconfig")
 
 e2lib.init()
 
index 005c7c69ea80c48ea48409a0d66966c17a1ec0ca..4ff0ea8312dac03da6a5af6f8aca088229d2cc03 100644 (file)
 ]]
 
 local cvs = {}
+local e2lib = require("e2lib")
 local scm = require("scm")
 local hash = require("hash")
 local url = require("url")
 local tools = require("tools")
 local err = require("err")
-local e2lib = require("e2lib")
+local strict = require("strict")
 
 plugin_descriptor = {
     description = "CVS SCM Plugin",
@@ -433,4 +434,6 @@ function cvs.check_workingcopy(info, sourcename)
     return true, nil
 end
 
+strict.lock(cvs)
+
 -- vim:sw=4:sts=4:et:
index fe870f1492fd77b63393bdb7589e36f007facf68..d181e6e0604985479680d30b3a9570b9247d9b01 100644 (file)
@@ -33,6 +33,7 @@ local e2lib = require("e2lib")
 local scm = require("scm")
 local environment = require("environment")
 local e2tool = require("e2tool")
+local strict = require("strict")
 
 -- table of functions to drive the build process
 -- forward declaration, filled at the end of file
@@ -1289,6 +1290,6 @@ build_process = {
     { prio=1400, name="chroot_unlock", func=chroot_unlock },
 }
 
-return e2build
+return strict.lock(e2build)
 
 -- vim:sw=4:sts=4:et:
index 3c933aa3b4354b512b4f3f2f1b3d28e764f9469b..9a601aa0f53ca7e7832dcfbbc544d670c79907bb 100644 (file)
@@ -42,6 +42,7 @@ require("e2util")
 local e2option = require("e2option")
 local generic_git = require("generic_git")
 local policy = require("policy")
+local strict = require("strict")
 
 -- Information gathering and inquiry
 --
@@ -2985,6 +2986,6 @@ function e2tool.register_dlist(info, func)
     return true, nil
 end
 
-return e2tool
+return strict.lock(e2tool)
 
 -- vim:sw=4:sts=4:et:
index 279bd63ecd60e26b197c3e3bee27a97d380f0ca3..b234d1cbc8be4baf6f1d5abeeba79ae6e157f168 100644 (file)
@@ -27,6 +27,7 @@
 
 local environment = {}
 local hash = require("hash")
+local strict = require("strict")
 
 --- create new environment
 -- @return environment
@@ -162,6 +163,6 @@ end
 
 -- unittest()
 
-return environment
+return strict.lock(environment)
 
 -- vim:sw=4:sts=4:et:
index 2a5e054899d9a0d68dc2e58696787dae5f2d19b4..f5a979aeb68c82cda75b41b8527c38f695adaed4 100644 (file)
@@ -31,6 +31,7 @@ local hash = require("hash")
 local err = require("err")
 local e2lib = require("e2lib")
 local e2tool = require("e2tool")
+local strict = require("strict")
 
 plugin_descriptor = {
     description = "Files SCM Plugin",
@@ -461,4 +462,6 @@ function files.update(info, sourcename)
     return true, nil
 end
 
+strict.lock(files)
+
 -- vim:sw=4:sts=4:et:
index 7993bff3f353a58929e896fa86ed33c16274dcc0..cb658d9010daef8968c0be09c406214cdbc84abd 100644 (file)
@@ -35,6 +35,7 @@ local err = require("err")
 local e2option = require("e2option")
 local e2lib = require("e2lib")
 local e2tool = require("e2tool")
+local strict = require("strict")
 
 plugin_descriptor = {
     description = "Git SCM Plugin",
@@ -614,4 +615,6 @@ function git.check_workingcopy(info, sourcename)
     return true, nil
 end
 
+strict.lock(git)
+
 -- vim:sw=4:sts=4:et:
index dd4cba36d65030663f665d88212225a9d8d7e87a..f9b3d25befc80442430a96fa4901796da8580147 100644 (file)
 ]]
 
 local policy = {}
+local e2lib = require("e2lib")
 local err = require("err")
 local e2option = require("e2option")
-local e2lib = require("e2lib")
+local strict = require("strict")
 
 --- source_set_* get the source set identifier
 -- @class function
@@ -255,6 +256,6 @@ function policy.default_build_mode(mode)
     end
 end
 
-return policy
+return strict.lock(policy)
 
 -- vim:sw=4:sts=4:et:
index 3f1a4666702ecf252967ee0e9289626e2c7b5a84..f84c9aa2b05cb418627ad05f90a7dbbab63f01a7 100644 (file)
@@ -32,6 +32,7 @@ local url = require("url")
 local tools = require("tools")
 local err = require("err")
 local e2lib = require("e2lib")
+local strict = require("strict")
 
 plugin_descriptor = {
     description = "SVN SCM Plugin",
@@ -380,4 +381,6 @@ function svn.validate_source(info, sourcename)
     return true, nil
 end
 
+strict.lock(svn)
+
 -- vim:sw=4:sts=4:et: