From ebdf52b6962c02608b73e7fd9580486cbdd35e29 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Mon, 23 Jan 2017 16:24:02 +0100 Subject: [PATCH] cache: remove info.cache Signed-off-by: Tobias Ulmer --- generic/cache.lua | 14 ++++++++++++++ global/e2-create-project.lua | 18 ++++++++++-------- global/e2-fetch-project.lua | 12 +++++++----- global/e2-install-e2.lua | 12 +++++++----- local/chroot.lua | 2 +- local/e2-fetch-sources.lua | 4 ++-- local/e2-ls-project.lua | 4 ++-- local/e2-new-source.lua | 4 ++-- local/e2build.lua | 26 +++++++++++++------------- local/e2tool.lua | 18 ++++++++++-------- local/policy.lua | 8 ++++---- local/source.lua | 2 +- plugins/collect_project.lua | 10 +++++----- plugins/cvs.lua | 2 +- plugins/files.lua | 12 ++++++------ plugins/git.lua | 6 +++--- plugins/gitrepo.lua | 4 ++-- plugins/svn.lua | 6 +++--- 18 files changed, 93 insertions(+), 71 deletions(-) diff --git a/generic/cache.lua b/generic/cache.lua index e920942..1e522c7 100644 --- a/generic/cache.lua +++ b/generic/cache.lua @@ -114,6 +114,20 @@ function cache.setup_cache(config) return c end +local _cache +--- Set or return the current cache object. +-- @param the_cache New cache object. Optional. +-- @return Current cache object. +-- @raise Assertion if unset/invalid +function cache.cache(the_cache) + if the_cache then + _cache = the_cache + end + assertIsTable(_cache) + assert(_cache._name == "local cache") + return _cache +end + --- Add local servers to the cache configuration. As the name implies, -- this function should not be called from a global context. -- @param c cache object diff --git a/global/e2-create-project.lua b/global/e2-create-project.lua index 733f52d..bc8dc77 100644 --- a/global/e2-create-project.lua +++ b/global/e2-create-project.lua @@ -116,12 +116,14 @@ local function e2_create_project(arg) error(e:cat(re)) end - local scache, re = cache.setup_cache(config) - if not scache then + rc, re = cache.setup_cache(config) + if not rc then error(e:cat(re)) end - rc, re = cache.setup_cache_apply_opts(scache) + cache.cache(rc) + + rc, re = cache.setup_cache_apply_opts(cache.cache()) if not rc then error(e:cat(re)) end @@ -136,10 +138,10 @@ local function e2_create_project(arg) error(e:cat(re)) end - if not cache.writeback_enabled(scache, sl.server) then + if not cache.writeback_enabled(cache.cache(), sl.server) then e2lib.warnf("WOTHER", "enabling writeback for server: %s", sl.server) - rc, re = cache.set_writeback(scache, sl.server, true) + rc, re = cache.set_writeback(cache.cache(), sl.server, true) if not rc then error(e:cat(re)) end @@ -185,7 +187,7 @@ local function e2_create_project(arg) end flocation = e2lib.join(p.location, f.filename) - rc, re = cache.push_file(scache, sourcefile, p.server, flocation) + rc, re = cache.push_file(cache.cache(), sourcefile, p.server, flocation) if not rc then error(e:cat(re)) end @@ -200,7 +202,7 @@ local function e2_create_project(arg) -- create the initial repository on server side local rlocation = string.format("%s/proj/%s.git", p.location, p.name) - rc, re = generic_git.git_init_db(scache, p.server, rlocation) + rc, re = generic_git.git_init_db(cache.cache(), p.server, rlocation) if not rc then error(e:cat(re)) end @@ -301,7 +303,7 @@ local function e2_create_project(arg) local refspec = "master:refs/heads/master" local rlocation = string.format("%s/proj/%s.git", p.location, p.name) - rc, re = generic_git.git_push(scache, tmp_repo_path, p.server, + rc, re = generic_git.git_push(cache.cache(), tmp_repo_path, p.server, rlocation, refspec) if not rc then error(e:cat(re)) diff --git a/global/e2-fetch-project.lua b/global/e2-fetch-project.lua index d5de693..c501900 100644 --- a/global/e2-fetch-project.lua +++ b/global/e2-fetch-project.lua @@ -55,12 +55,14 @@ local function e2_fetch_project(arg) end -- setup cache - local scache, re = cache.setup_cache(config) - if not scache then + rc, re = cache.setup_cache(config) + if not rc then error(e:cat(re)) end - rc, re = cache.setup_cache_apply_opts(scache) + cache.cache(rc) + + rc, re = cache.setup_cache_apply_opts(cache.cache()) if not rc then error(e:cat(re)) end @@ -118,7 +120,7 @@ local function e2_fetch_project(arg) end local location = string.format("%s/version", p.location) - local rc, re = cache.fetch_file(scache, p.server, location, tmpdir, nil, + local rc, re = cache.fetch_file(cache.cache(), p.server, location, tmpdir, nil, { cache = false }) if not rc then error(e:cat(re)) @@ -142,7 +144,7 @@ local function e2_fetch_project(arg) -- clone the git repository local location = string.format("%s/proj/%s.git", p.location, p.name) local skip_checkout = false - local rc, re = generic_git.git_clone_from_server(scache, p.server, location, + local rc, re = generic_git.git_clone_from_server(cache.cache(), p.server, location, p.destdir, skip_checkout) if not rc then error(e:cat(re)) diff --git a/global/e2-install-e2.lua b/global/e2-install-e2.lua index 7073109..eb02d1a 100644 --- a/global/e2-install-e2.lua +++ b/global/e2-install-e2.lua @@ -59,12 +59,14 @@ local function e2_install_e2(arg) error(re) end - local scache, re = cache.setup_cache(config) - if not scache then + rc, re = cache.setup_cache(config) + if not rc then error(e:cat(re)) end - rc, re = cache.setup_cache_apply_opts(scache) + cache.cache(rc) + + rc, re = cache.setup_cache_apply_opts(cache.cache()) if not rc then error(e:cat(re)) end @@ -130,7 +132,7 @@ local function e2_install_e2(arg) local location = config.site.e2_location local destdir = e2lib.join(root, ".e2/e2") e2lib.logf(2, "fetching e2factory (ref %s)", ref) - rc, re = generic_git.git_clone_from_server(scache, server, location, + rc, re = generic_git.git_clone_from_server(cache.cache(), server, location, destdir, false) if not rc then error(e:cat(re)) @@ -158,7 +160,7 @@ local function e2_install_e2(arg) end end - rc, re = generic_git.git_clone_from_server(scache, server, location, + rc, re = generic_git.git_clone_from_server(cache.cache(), server, location, destdir, false) if not rc then error(e:cat(re)) diff --git a/local/chroot.lua b/local/chroot.lua index 20b573a..43329dd 100644 --- a/local/chroot.lua +++ b/local/chroot.lua @@ -220,7 +220,7 @@ function chroot.load_chroot_config(info) e:append(" `server' attribute missing") return false, e end - if not cache.valid_server(info.cache, grp.server) then + if not cache.valid_server(cache.cache(), grp.server) then e:append("in group: %s", grp.name) e:append(" no such server: %s", grp.server) return false, e diff --git a/local/e2-fetch-sources.lua b/local/e2-fetch-sources.lua index 204e221..8f0e3b3 100644 --- a/local/e2-fetch-sources.lua +++ b/local/e2-fetch-sources.lua @@ -94,8 +94,8 @@ local function e2_fetch_source(arg) for _,g in ipairs(chroot.groups_sorted) do grp = chroot.groups_byname[g] for file in grp:file_iter() do - if cache.cache_enabled(info.cache, file:server()) then - rc, re = cache.fetch_file_path(info.cache, file:server(), + if cache.cache_enabled(cache.cache(), file:server()) then + rc, re = cache.fetch_file_path(cache.cache(), file:server(), file:location()) if not rc then return false, re diff --git a/local/e2-ls-project.lua b/local/e2-ls-project.lua index 767689d..cce586a 100644 --- a/local/e2-ls-project.lua +++ b/local/e2-ls-project.lua @@ -216,9 +216,9 @@ local function e2_ls_project(arg) local s1 = "|" local s2 = "|" p1(s1, s2, "servers") - local servers_sorted = cache.servers(info.cache) + local servers_sorted = cache.servers(cache.cache()) for i = 1, #servers_sorted, 1 do - local ce = cache.ce_by_server(info.cache, servers_sorted[i]) + local ce = cache.ce_by_server(cache.cache(), servers_sorted[i]) if i < #servers_sorted then s2 = "|" else diff --git a/local/e2-new-source.lua b/local/e2-new-source.lua index 1caafe2..68a0a6c 100644 --- a/local/e2-new-source.lua +++ b/local/e2-new-source.lua @@ -260,7 +260,7 @@ local function e2_new_source(arg) -- local local lserver = cache.server_names().dot local llocation = string.format("in/%s/.git", name) - local rc, re = generic_git.new_repository(info.cache, lserver, llocation, + local rc, re = generic_git.new_repository(cache.cache(), lserver, llocation, rserver, rlocation) if not rc then error(re) @@ -286,7 +286,7 @@ local function e2_new_source(arg) error(err.new("checksum file argument missing")) end - local rc, re = new_files_source(info.cache, server, location, source_file, + local rc, re = new_files_source(cache.cache(), server, location, source_file, checksum_file, verify) if not rc then error(re) diff --git a/local/e2build.lua b/local/e2build.lua index edd2083..3b311aa 100644 --- a/local/e2build.lua +++ b/local/e2build.lua @@ -302,7 +302,7 @@ function e2build.build_process_class:_result_available(res, return_flags) local result_location = e2lib.join(location, res:get_name(), buildid, "result.tar") - rc, re = cache.file_exists(info.cache, server, result_location) + rc, re = cache.file_exists(cache.cache(), server, result_location) if re then return false, e:cat(re) end @@ -437,7 +437,7 @@ function e2build.build_process_class:_setup_chroot(res, return_flags) return false, e:cat(re) end - path, re = cache.fetch_file_path(info.cache, file:server(), file:location()) + path, re = cache.fetch_file_path(cache.cache(), file:server(), file:location()) if not path then return false, e:cat(re) end @@ -483,7 +483,7 @@ function e2build.build_process_class:_install_build_script(res, return_flags) destdir = e2lib.join(bc.T, "script") info = e2tool.info() - rc, re = cache.fetch_file(info.cache, cache.server_names().dot, + rc, re = cache.fetch_file(cache.cache(), cache.server_names().dot, location, destdir) if not rc then e = err.new("installing build script") @@ -534,7 +534,7 @@ function e2build.build_process_class:_install_init_files(res, return_flags) abslocation) end - rc, re = cache.fetch_file(info.cache, + rc, re = cache.fetch_file(cache.cache(), cache.server_names().dot, location, destdir) if not rc then return false, e:cat(re) @@ -624,7 +624,7 @@ function e2build.build_process_class:helper_unpack_result(res, dep, destdir) dep:get_name(), server, location) resulttarpath = e2lib.join(location, dep:get_name(), buildid, "result.tar") - path, re = cache.fetch_file_path(info.cache, server, resulttarpath) + path, re = cache.fetch_file_path(cache.cache(), server, resulttarpath) if not path then return false, e:cat(re) end @@ -876,7 +876,7 @@ function e2build.build_process_class:helper_deploy(res, tmpdir) local cache_flags = { cache = false, } - local rc, re = cache.fetch_file(info.cache, server, location1, tmpdir, + local rc, re = cache.fetch_file(cache.cache(), server, location1, tmpdir, nil, cache_flags) if rc then e2lib.warnf("WOTHER", @@ -893,13 +893,13 @@ function e2build.build_process_class:helper_deploy(res, tmpdir) sourcefile = e2lib.join(resdir, f) location1 = e2lib.join(location, res:get_name(), f) - rc, re = cache.push_file(info.cache, sourcefile, server, location1, + rc, re = cache.push_file(cache.cache(), sourcefile, server, location1, cache_flags) if not rc then return false, re end end - if cache.writeback_enabled(info.cache, server, cache_flags) == false then + if cache.writeback_enabled(cache.cache(), server, cache_flags) == false then e2lib.warnf("WOTHER", "Writeback is disabled for server %q. Release not deployed!", server) end @@ -1034,7 +1034,7 @@ function e2build.build_process_class:_store_result(res, return_flags) local cache_flags = { try_hardlink = true, } - rc, re = cache.push_file(info.cache, sourcefile, server, + rc, re = cache.push_file(cache.cache(), sourcefile, server, location1, cache_flags) if not rc then return false, e:cat(re) @@ -1067,8 +1067,8 @@ function e2build.build_process_class:_linklast(res, return_flags) location = e2lib.join(location, res:get_name(), buildid, "result.tar") -- if we don't have cache or server on local fs, fetch a copy into "out" - if not cache.cache_enabled(info.cache, server) and not - cache.islocal_enabled(info.cache, server) then + if not cache.cache_enabled(cache.cache(), server) and not + cache.islocal_enabled(cache.cache(), server) then e2lib.logf(3, "%s: copy to out/%s/last, server %q has no cache/not local", res:get_name(), res:get_name(), server) @@ -1081,14 +1081,14 @@ function e2build.build_process_class:_linklast(res, return_flags) return e:cat(re) end - rc, re = cache.fetch_file(info.cache, server, location, lnk, nil) + rc, re = cache.fetch_file(cache.cache(), server, location, lnk, nil) if not rc then return false, e:cat(re) end return true else -- otherwise create a symlink - dst, re = cache.fetch_file_path(info.cache, server, location) + dst, re = cache.fetch_file_path(cache.cache(), server, location) if not dst then return false, e:cat(re) end diff --git a/local/e2tool.lua b/local/e2tool.lua index 4466c64..5ee04e0 100644 --- a/local/e2tool.lua +++ b/local/e2tool.lua @@ -143,7 +143,7 @@ function e2tool.file_class:validate_set_servloc(server, location) info = e2tool.info() - if not cache.valid_server(info.cache, server) then + if not cache.valid_server(cache.cache(), server) then return false, err.new("file entry with unknown server: %s", server) end @@ -244,7 +244,7 @@ function e2tool.file_class:_compute_checksum(digest_type, flags) info = e2tool.info() - path, re = cache.fetch_file_path(info.cache, self._server, self._location, + path, re = cache.fetch_file_path(cache.cache(), self._server, self._location, flags) if not path then return false, re @@ -276,7 +276,7 @@ function e2tool.file_class:_compute_remote_checksum(digest_type) info = e2tool.info() - surl, re = cache.remote_url(info.cache, self._server, self._location) + surl, re = cache.remote_url(cache.cache(), self._server, self._location) if not surl then return false, re end @@ -432,7 +432,7 @@ function e2tool.file_class:checksum_verify() for _,digest_type in ipairs(digest_types) do - if cache.cache_enabled(info.cache, self._server) then + if cache.cache_enabled(cache.cache(), self._server) then cs_cache, re = self:_compute_checksum(digest_type) if not cs_cache then return false, e:cat(re) @@ -1017,17 +1017,19 @@ function e2tool.collect_project_info(info, skip_load_config) return false, e:cat(re) end - info.cache, re = cache.setup_cache(config) - if not info.cache then + rc, re = cache.setup_cache(config) + if not rc then return false, e:cat(re) end - rc, re = cache.setup_cache_local(info.cache, e2tool.root(), info.project_location) + cache.cache(rc) + + rc, re = cache.setup_cache_local(cache.cache(), e2tool.root(), info.project_location) if not rc then return false, e:cat(re) end - rc, re = cache.setup_cache_apply_opts(info.cache) + rc, re = cache.setup_cache_apply_opts(cache.cache()) if not rc then return false, e:cat(re) end diff --git a/local/policy.lua b/local/policy.lua index 725e87f..186e506 100644 --- a/local/policy.lua +++ b/local/policy.lua @@ -167,16 +167,16 @@ function policy.init(info) local release_id = "release-id" local server, location = s(location, release_id) local se = err.new("checking server configuration for '%s'", server) - local ce, re = cache.ce_by_server(info.cache, server) + local ce, re = cache.ce_by_server(cache.cache(), server) if not ce then se:cat(re) - elseif not cache.writeback_enabled(info.cache, server) then + elseif not cache.writeback_enabled(cache.cache(), server) then e2lib.warnf("WPOLICY", "Results will not be pushed to server: '%s'".. " (Writeback disabled)", server) end - if ce and not (cache.writeback_enabled(info.cache, server) - or cache.cache_enabled(info.cache, server)) then + if ce and not (cache.writeback_enabled(cache.cache(), server) + or cache.cache_enabled(cache.cache(), server)) then se:append( "Cannot store results. ".. "Enable cache or writeback.") diff --git a/local/source.lua b/local/source.lua index 849c2a3..cb80135 100644 --- a/local/source.lua +++ b/local/source.lua @@ -448,7 +448,7 @@ function source.generic_source_validate_server(rawsrc, ismandatory) return false, err.new("'server' attribute must be a string") end - if rawsrc.server and (not cache.valid_server(info.cache, rawsrc.server)) then + if rawsrc.server and (not cache.valid_server(cache.cache(), rawsrc.server)) then return false, err.new("invalid server: %s", rawsrc.server) end diff --git a/plugins/collect_project.lua b/plugins/collect_project.lua index 82d0b90..1d3f834 100644 --- a/plugins/collect_project.lua +++ b/plugins/collect_project.lua @@ -158,7 +158,7 @@ local function _build_collect_project(self, res, return_flags) local server = cache.server_names().dot local location = e2lib.join("proj/init", f) local cache_flags = {} - rc, re = cache.fetch_file(info.cache, server, location, + rc, re = cache.fetch_file(cache.cache(), server, location, destdir, nil, cache_flags) if not rc then return false, e:cat(re) @@ -196,7 +196,7 @@ local function _build_collect_project(self, res, return_flags) for file in grp:file_iter() do local cache_flags = {} - rc, re = cache.fetch_file(info.cache, file:server(), + rc, re = cache.fetch_file(cache.cache(), file:server(), file:location(), destdir, nil, cache_flags) if not rc then return false, e:cat(re) @@ -247,7 +247,7 @@ local function _build_collect_project(self, res, return_flags) if not rc then return false, e:cat(re) end - rc, re = cache.fetch_file(info.cache, file:server(), file:location(), + rc, re = cache.fetch_file(cache.cache(), file:server(), file:location(), destdir, nil, cache_flags) if not rc then return false, e:cat(re) @@ -275,7 +275,7 @@ local function _build_collect_project(self, res, return_flags) for _,file in pairs(files) do local server = cache.server_names().dot local cache_flags = {} - rc, re = cache.fetch_file(info.cache, server, file, destdir, + rc, re = cache.fetch_file(cache.cache(), server, file, destdir, nil, cache_flags) if not rc then return false, e:cat(re) @@ -356,7 +356,7 @@ local function _build_collect_project(self, res, return_flags) ".e2/lib/make/detect_tool", } for _,location in ipairs(locations) do - rc, re = cache.fetch_file(info.cache, server, location, + rc, re = cache.fetch_file(cache.cache(), server, location, destdir, nil, cache_flags) if not rc then return false, e:cat(re) diff --git a/plugins/cvs.lua b/plugins/cvs.lua index a7c98b5..037e99a 100644 --- a/plugins/cvs.lua +++ b/plugins/cvs.lua @@ -305,7 +305,7 @@ local function mkcvsroot(info, sourcename) src = source.sources[sourcename] - surl, re = cache.remote_url(info.cache, src:get_server(), src:get_cvsroot()) + surl, re = cache.remote_url(cache.cache(), src:get_server(), src:get_cvsroot()) if not surl then return false, e:cat(re) end diff --git a/plugins/files.lua b/plugins/files.lua index 4334a38..98c67d3 100644 --- a/plugins/files.lua +++ b/plugins/files.lua @@ -309,9 +309,9 @@ function files.fetch_source(info, sourcename) local e = err.new("fetching source failed: %s", sourcename) for file in src:file_iter() do - if cache.cache_enabled(info.cache, file:server()) then + if cache.cache_enabled(cache.cache(), file:server()) then e2lib.logf(3, "files.fetch_source: caching file %s", file:servloc()) - rc, re = cache.fetch_file_path(info.cache, file:server(), file:location()) + rc, re = cache.fetch_file_path(cache.cache(), file:server(), file:location()) if not rc then return false, e:cat(re) end @@ -487,7 +487,7 @@ function files.prepare_source(info, sourcename, sourceset, buildpath) return false, e:cat(re) end if file:unpack() then - local path, re = cache.fetch_file_path(info.cache, + local path, re = cache.fetch_file_path(cache.cache(), file:server(), file:location()) if not path then return false, e:cat(re) @@ -531,7 +531,7 @@ function files.prepare_source(info, sourcename, sourceset, buildpath) end end if file:patch() then - local path, re = cache.fetch_file_path(info.cache, + local path, re = cache.fetch_file_path(cache.cache(), file:server(), file:location()) if not path then return false, e:append(re) @@ -553,7 +553,7 @@ function files.prepare_source(info, sourcename, sourceset, buildpath) return false, e:cat(re) end - local rc, re = cache.fetch_file(info.cache, file:server(), + local rc, re = cache.fetch_file(cache.cache(), file:server(), file:location(), destdir, destname, {}) if not rc then return false, e:cat(re) @@ -605,7 +605,7 @@ function files.toresult(info, sourcename, sourceset, directory) sourcename, destname) end - rc, re = cache.fetch_file(info.cache, file:server(), file:location(), + rc, re = cache.fetch_file(cache.cache(), file:server(), file:location(), destdir, destname, {}) if not rc then return false, e:cat(re) diff --git a/plugins/git.lua b/plugins/git.lua index 5ddac52..44c51d6 100644 --- a/plugins/git.lua +++ b/plugins/git.lua @@ -30,10 +30,10 @@ local generic_git = require("generic_git") local hash = require("hash") local licence = require("licence") local scm = require("scm") +local source = require("source") local strict = require("strict") local tools = require("tools") local url = require("url") -local source = require("source") --- Initialize git plugin. -- @param ctx Plugin context. See plugin module. @@ -348,7 +348,7 @@ function git.git_source:check_workingcopy() -- git config remote.origin.url == server:location query = string.format("remote.origin.url") - expect, re = git_url(e2tool.info().cache, self._server, self._location) + expect, re = git_url(cache.cache(), self._server, self._location) if not expect then return false, e:cat(re) end @@ -532,7 +532,7 @@ function git.fetch_source(info, sourcename) e2lib.logf(2, "cloning %s:%s [%s]", src:get_server(), src:get_location(), src:get_branch()) - rc, re = generic_git.git_clone_from_server(info.cache, src:get_server(), + rc, re = generic_git.git_clone_from_server(cache.cache(), src:get_server(), src:get_location(), work_tree, false --[[always checkout]]) if not rc then return false, e:cat(re) diff --git a/plugins/gitrepo.lua b/plugins/gitrepo.lua index 22b98e9..21af90b 100644 --- a/plugins/gitrepo.lua +++ b/plugins/gitrepo.lua @@ -291,7 +291,7 @@ function gitrepo_source:check_workingcopy() -- git config remote.origin.url == server:location query = string.format("remote.origin.url") - expect, re = git_url(e2tool.info().cache, self._server, self._location) + expect, re = git_url(cache.cache(), self._server, self._location) if not expect then return false, e:cat(re) end @@ -345,7 +345,7 @@ function gitrepo.fetch_source(info, sourcename) e2lib.logf(2, "cloning %s:%s [%s]", src:get_server(), src:get_location(), src:get_branch()) - rc, re = generic_git.git_clone_from_server(info.cache, src:get_server(), + rc, re = generic_git.git_clone_from_server(cache.cache(), src:get_server(), src:get_location(), work_tree, false --[[always checkout]]) if not rc then return false, e:cat(re) diff --git a/plugins/svn.lua b/plugins/svn.lua index 85fd096..c616eb5 100644 --- a/plugins/svn.lua +++ b/plugins/svn.lua @@ -296,7 +296,7 @@ function svn.svn_source:sourceid(sourceset) info = e2tool.info() assert(type(info) == "table") - surl, re = cache.remote_url(info.cache, self._server, self._location) + surl, re = cache.remote_url(cache.cache(), self._server, self._location) if not surl then return false, re end @@ -408,7 +408,7 @@ function svn.fetch_source(info, sourcename) local src = source.sources[sourcename] local location = src:get_location() local server = src:get_server() - local surl, re = cache.remote_url(info.cache, server, location) + local surl, re = cache.remote_url(cache.cache(), server, location) if not surl then return false, e:cat(re) end @@ -436,7 +436,7 @@ function svn.prepare_source(info, sourcename, sourceset, build_path) local src = source.sources[sourcename] local location = src:get_location() local server = src:get_server() - local surl, re = cache.remote_url(info.cache, server, location) + local surl, re = cache.remote_url(cache.cache(), server, location) if not surl then return false, e:cat(re) end -- 2.39.5