]> git.e2factory.org Git - e2factory.git/commitdiff
Remove info table throughout factory, only small pieces remain.
authorTobias Ulmer <tu@emlix.com>
Mon, 23 Jan 2017 17:49:57 +0000 (18:49 +0100)
committerTobias Ulmer <tu@emlix.com>
Mon, 30 Jan 2017 13:33:34 +0000 (14:33 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
16 files changed:
local/chroot.lua
local/e2-build-numbers.lua
local/e2-build.lua
local/e2-cf.lua
local/e2-fetch-sources.lua
local/e2build.lua
local/e2tool.lua
local/licence.lua
local/policy.lua
local/project.lua
local/projenv.lua
local/result.lua
local/source.lua
plugins/collect_project.lua
plugins/cvs.lua
plugins/svn.lua

index 43329dde84bb86ad3c415ad88a4a71b6146b5418..58f083586c41ff0fae7fbcb62a86a0b88fb514de 100644 (file)
@@ -110,10 +110,9 @@ function chroot.chroot:file_iter()
 end
 
 --- Calculate chroot group id.
--- @param info Info table.
 -- @return Chroot group ID or false on error.
 -- @return Error object on failure.
-function chroot.chroot:chrootgroupid(info)
+function chroot.chroot:chrootgroupid()
     local rc, re, e, hc
 
     if self._chrootgroupid then
@@ -142,10 +141,9 @@ end
 
 --- Load and validate chroot configuration. Populates chroot.groups_byname,
 -- chroot.groups_sorted and chroot.groups_default.
--- @param info Info table.
 -- @return True on success, false on error.
 -- @return Error object on failure
-function chroot.load_chroot_config(info)
+function chroot.load_chroot_config()
     local rc, re, e
     local t, path, cgroup
 
index 1ea959ffd8d6d25e8fdde124de534c7ce1076fcf..98419d482abb9e8d718b5be27dd3444c61490b31 100644 (file)
@@ -29,8 +29,8 @@ local function e2_build_numbers(arg)
         error(re)
     end
 
-    local info, re = e2tool.local_init(nil, "build-numbers")
-    if not info then
+    rc, re = e2tool.local_init(nil, "build-numbers")
+    if not rc then
         error(re)
     end
 
index 93654387883d4e0ce98ce4f47d69425a6c767389..e76f5b5fe7b1a588cec0806d54bdf0f9319ca65a 100644 (file)
@@ -118,8 +118,8 @@ local function e2_build(arg)
     local keep_chroot = opts["keep"]
 
     -- apply flags to the selected results
-    rc, re = e2tool.select_results(info, resultvec, force_rebuild,
-        keep_chroot, build_mode, playground)
+    rc, re = e2tool.select_results(resultvec, force_rebuild, keep_chroot,
+        build_mode, playground)
     if not rc then
         error(re)
     end
@@ -161,7 +161,7 @@ local function e2_build(arg)
         end
     end
 
-    rc, re = e2tool.print_selection(info, sel_res)
+    rc, re = e2tool.print_selection(sel_res)
     if not rc then
         error(re)
     end
index b68016834c5d4e52ba8a52e22585ee3e0c7e8510..6c38aea30aa6ae09399aff2bd90cfa593808e88e 100644 (file)
@@ -42,7 +42,7 @@ local function editor(file)
 end
 
 --- Find whether upstream config files hide this source/result.
-local function shadow_config_up(info, src_res, pathname)
+local function shadow_config_up(src_res, pathname)
     local cf, cfdir
     if src_res == "src" then
         cf = e2tool.sourceconfig(pathname, e2tool.root())
@@ -68,12 +68,12 @@ local function shadow_config_up(info, src_res, pathname)
             err.new("config in %s would shadow the new %s", cfdir, thing)
     end
 
-    return shadow_config_up(info, src_res, e2lib.dirname(pathname))
+    return shadow_config_up(src_res, e2lib.dirname(pathname))
 end
 
 --- Find whether downstream sources/results would be hidden by creating
 -- config here.
-local function shadow_config_down(info, src_res, pathname)
+local function shadow_config_down(src_res, pathname)
     local cf, cfdir
     if src_res == "src" then
         cf = e2tool.sourceconfig(pathname, e2tool.root())
@@ -96,7 +96,7 @@ local function shadow_config_down(info, src_res, pathname)
         end
 
         if e2lib.isdir(e2lib.join(cfdir, f)) then
-            return shadow_config_down(info, src_res, e2lib.join(pathname, f))
+            return shadow_config_down(src_res, e2lib.join(pathname, f))
         end
     end
 
@@ -140,12 +140,12 @@ local function newsource(info, ...)
         return false, e:append("refusing to overwrite config in %s", cfdir)
     end
 
-    rc, re = shadow_config_up(info, "src", pathname)
+    rc, re = shadow_config_up("src", pathname)
     if not rc then
         return false, e:cat(re)
     end
 
-    rc, re = shadow_config_down(info, "src", pathname)
+    rc, re = shadow_config_down("src", pathname)
     if not rc then
         return false, e:cat(re)
     end
@@ -228,12 +228,12 @@ local function newresult(info, ...)
             e:append("refusing to overwrite build-script in %s", cfdir)
     end
 
-    rc, re = shadow_config_up(info, "res", pathname)
+    rc, re = shadow_config_up("res", pathname)
     if not rc then
         return false, e:cat(re)
     end
 
-    rc, re = shadow_config_down(info, "res", pathname)
+    rc, re = shadow_config_down("res", pathname)
     if not rc then
         return false, e:cat(re)
     end
index 8f0e3b3edc37bd5769581c8e2ccdafd987be363a..2de1a41370df7dbf4e7b822c51eee2a80ca184b6 100644 (file)
@@ -86,10 +86,9 @@ local function e2_fetch_source(arg)
     end
 
     --- cache chroot files
-    -- @param info the info table
     -- @return bool
     -- @return nil, an error string on error
-    local function cache_chroot(info)
+    local function cache_chroot()
         local grp, rc, re
         for _,g in ipairs(chroot.groups_sorted) do
             grp = chroot.groups_byname[g]
@@ -195,7 +194,7 @@ local function e2_fetch_source(arg)
 
     if opts.chroot then
         e2lib.log(2, "caching chroot files")
-        local rc, re = cache_chroot(info)
+        local rc, re = cache_chroot()
         if not rc then
             e:append("Error: Caching chroot files failed")
             e:cat(re)
index 3b311aa3b948b53bea56cc13dfc972b2ce455064..de87e13d0ed5a5233f168f4f1ccadadab75a7efb 100644 (file)
@@ -246,16 +246,15 @@ function e2build.build_process_class:_enter_playground(res, return_flags)
     table.insert(cmd, "-c")
     table.insert(cmd, res:build_settings():command())
 
-    local info = e2tool.info()
-    e2tool.set_umask(info)
+    e2tool.set_umask()
     rc, re = e2lib.callcmd(cmd, {})
     if not rc then
-        e2tool.reset_umask(info)
+        e2tool.reset_umask()
         return false, e:cat(re)
     end
     -- return code depends on user commands. Ignore.
 
-    e2tool.reset_umask(info)
+    e2tool.reset_umask()
 
     return true
 end
@@ -361,11 +360,10 @@ end
 function e2build.build_process_class:helper_chroot_remove(res)
     local e = err.new("removing chroot failed")
     local rc, re, bc
-    local info = e2tool.info()
     bc = res:build_config()
-    e2tool.set_umask(info)
+    e2tool.set_umask()
     rc, re = e2lib.e2_su_2_2({"remove_chroot_2_3", bc.base})
-    e2tool.reset_umask(info)
+    e2tool.reset_umask()
     if not rc then
         return e:cat(re)
     end
@@ -397,7 +395,7 @@ end
 
 ---
 function e2build.build_process_class:_setup_chroot(res, return_flags)
-    local rc, re, bc, info
+    local rc, re, bc
     local e = err.new("error setting up chroot")
     -- create the chroot path and create the chroot marker file without root
     -- permissions. That makes sure we have write permissions here.
@@ -419,10 +417,9 @@ function e2build.build_process_class:_setup_chroot(res, return_flags)
         return false, e:cat(re)
     end
 
-    info = e2tool.info()
-    e2tool.set_umask(info)
+    e2tool.set_umask()
     rc, re = e2lib.e2_su_2_2({"set_permissions_2_3", bc.base})
-    e2tool.reset_umask(info)
+    e2tool.reset_umask()
     if not rc then
         return false, e:cat(re)
     end
@@ -448,10 +445,10 @@ function e2build.build_process_class:_setup_chroot(res, return_flags)
                 return false, e:cat(re)
             end
 
-            e2tool.set_umask(info)
+            e2tool.set_umask()
             local argv = { "extract_tar_2_3", bc.base, tartype, path }
             rc, re = e2lib.e2_su_2_2(argv)
-            e2tool.reset_umask(info)
+            e2tool.reset_umask()
             if not rc then
                 return false, e:cat(re)
             end
@@ -477,11 +474,10 @@ end
 
 ---
 function e2build.build_process_class:_install_build_script(res, return_flags)
-    local rc, re, e, bc, location, destdir, info
+    local rc, re, e, bc, location, destdir
     bc = res:build_config()
     location = e2tool.resultbuildscript(res:get_name_as_path())
     destdir = e2lib.join(bc.T, "script")
-    info = e2tool.info()
 
     rc, re = cache.fetch_file(cache.cache(), cache.server_names().dot,
         location, destdir)
@@ -513,12 +509,10 @@ end
 
 ---
 function e2build.build_process_class:_install_init_files(res, return_flags)
-    local rc, re, info
+    local rc, re
     local bc = res:build_config()
     local e = err.new("installing init files")
 
-    info = e2tool.info()
-
     for x, re in e2lib.directory(e2tool.root() .. "/proj/init") do
         if not x then
             return false, e:cat(re)
@@ -547,7 +541,7 @@ end
 ---
 function e2build.build_process_class:_install_build_driver(res, return_flags)
     local e, rc, re
-    local bc, bd, destdir, buildrc_noinit_file, info, buildrc_file
+    local bc, bd, destdir, buildrc_noinit_file, buildrc_file
     local build_driver_file
     e = err.new("generating build driver script failed")
 
@@ -569,7 +563,6 @@ function e2build.build_process_class:_install_build_driver(res, return_flags)
     end
 
     -- init files
-    info = e2tool.info()
     for fn, re in e2lib.directory(e2lib.join(e2tool.root(), "proj/init")) do
         if not fn then
             return false, e:cat(re)
@@ -682,12 +675,10 @@ end
 ---
 function e2build.build_process_class:_install_build_time_dependencies(res, return_flags)
     local e, rc, re
-    local dependslist, info, dep, destdir
+    local dependslist, dep, destdir
 
     dependslist = res:depends_list()
 
-    info = e2tool.info()
-
     for dependsname in dependslist:iter() do
         dep = result.results[dependsname]
         destdir = e2lib.join(res:build_config().T, "dep", dep:get_name())
@@ -725,21 +716,20 @@ end
 function e2build.build_process_class:_fix_permissions(res, return_flags)
     local rc, re, bc
     local e = err.new("fixing permissions failed")
-    local info = e2tool.info()
     e2lib.log(3, "fix permissions")
 
-    e2tool.set_umask(info)
+    e2tool.set_umask()
     bc = res:build_config()
     local argv = { "chroot_2_3", bc.base, "chown", "-R", "root:root", bc.Tc }
     rc, re = e2lib.e2_su_2_2(argv)
-    e2tool.reset_umask(info)
+    e2tool.reset_umask()
     if not rc then
         return false, e:cat(re)
     end
-    e2tool.set_umask(info)
+    e2tool.set_umask()
     argv = { "chroot_2_3", bc.base, "chmod", "-R", "u=rwX,go=rX", bc.Tc }
     rc, re = e2lib.e2_su_2_2(argv)
-    e2tool.reset_umask(info)
+    e2tool.reset_umask()
     if not rc then
         return false, e:cat(re)
     end
@@ -761,7 +751,6 @@ end
 function e2build.build_process_class:_runbuild(res, return_flags)
     local rc, re, out, bc, cmd
     local e = err.new("build failed")
-    local info = e2tool.info()
 
     e2lib.logf(3, "building %s ...", res:get_name())
 
@@ -786,7 +775,7 @@ function e2build.build_process_class:_runbuild(res, return_flags)
         eio.fwrite(out, output)
     end
 
-    e2tool.set_umask(info)
+    e2tool.set_umask()
 
     cmd, re = tools.get_tool_flags_argv("e2-su-2.2")
     if not cmd then
@@ -809,7 +798,7 @@ function e2build.build_process_class:_runbuild(res, return_flags)
         eio.fclose(out)
         return false, e:cat(re)
     end
-    e2tool.reset_umask(info)
+    e2tool.reset_umask()
     if rc ~= 0 then
         eio.fclose(out)
         e = err.new("build script for %s failed with exit status %d", res:get_name(), rc)
index 5ee04e0f52a22430a4b8038f15f99779c46672a3..8c4439224a4e83f748921bf975a573a1b2b8776a 100644 (file)
@@ -127,8 +127,6 @@ end
 -- @return True on success, false on validation failure
 -- @return Error object on failure
 function e2tool.file_class:validate_set_servloc(server, location)
-    local info
-
     if server == nil then
         return false, err.new("file entry without 'server' attribute")
     end
@@ -141,8 +139,6 @@ function e2tool.file_class:validate_set_servloc(server, location)
         return false, err.new("'server' can't be empty")
     end
 
-    info = e2tool.info()
-
     if not cache.valid_server(cache.cache(), server) then
         return false, err.new("file entry with unknown server: %s", server)
     end
@@ -240,9 +236,7 @@ end
 -- @return error object on failure.
 function e2tool.file_class:_compute_checksum(digest_type, flags)
     assert(digest_type == digest.SHA1 or digest_type == digest.SHA256)
-    local rc, re, info, path, dt
-
-    info = e2tool.info()
+    local rc, re, path, dt
 
     path, re = cache.fetch_file_path(cache.cache(), self._server, self._location,
         flags)
@@ -272,9 +266,7 @@ end
 -- @return error object on failure.
 function e2tool.file_class:_compute_remote_checksum(digest_type)
     assert(digest_type == digest.SHA1 or digest_type == digest.SHA256)
-    local rc, re, info, surl, u, checksum
-
-    info = e2tool.info()
+    local rc, re, surl, u, checksum
 
     surl, re = cache.remote_url(cache.cache(), self._server, self._location)
     if not surl then
@@ -414,13 +406,11 @@ end
 -- @return True if verify succeeds, False otherwise
 -- @return Error object on failure.
 function e2tool.file_class:checksum_verify()
-    local rc, re, e, digest_types, cs_cache, cs_remote, cs_fetch, checksum, info
+    local rc, re, e, digest_types, cs_cache, cs_remote, cs_fetch, checksum
     local checksum_conf
 
     e = err.new("error verifying checksum of %s", self:servloc())
 
-    info = e2tool.info()
-
     digest_types = {}
     if self:sha1() or project.checksums_sha1() then
         table.insert(digest_types, digest.SHA1)
@@ -628,14 +618,12 @@ end
 -- @field host_umask Default umask of the process (decimal number).
 -- @field project_location string: project location relative to the servers
 -- @field local_template_path Path to the local templates (string).
--- @field cache The cache object.
 local _info = false
 
 --- Open debug logfile.
--- @param info Info table.
 -- @return True on success, false on error.
 -- @return Error object on failure.
-local function opendebuglogfile(info)
+local function opendebuglogfile()
     local rc, re, e, logfile, debuglogfile
 
     rc, re = e2lib.mkdir_recursive(e2lib.join(e2tool.root(), "log"))
@@ -990,7 +978,7 @@ function e2tool.collect_project_info(info, skip_load_config)
         return info
     end
 
-    rc, re = opendebuglogfile(info)
+    rc, re = opendebuglogfile()
     if not rc then
         return false, e:cat(re)
     end
@@ -1053,31 +1041,31 @@ function e2tool.collect_project_info(info, skip_load_config)
     end
 
     -- read project configuration
-    rc, re = project.load_project_config(info)
+    rc, re = project.load_project_config()
     if not rc then
         return false, e:cat(re)
     end
 
     -- chroot config
-    rc, re = chroot.load_chroot_config(info)
+    rc, re = chroot.load_chroot_config()
     if not rc then
         return false, e:cat(re)
     end
 
     -- licences
-    rc, re = licence.load_licence_config(info)
+    rc, re = licence.load_licence_config()
     if not rc then
         return false, e:cat(re)
     end
 
     -- sources
-    rc, re = source.load_source_configs(info)
+    rc, re = source.load_source_configs()
     if not rc then
         return false, e:cat(re)
     end
 
     -- results
-    rc, re = result.load_result_configs(info)
+    rc, re = result.load_result_configs()
     if not rc then
         return false, e:cat(re)
     end
@@ -1114,7 +1102,7 @@ function e2tool.collect_project_info(info, skip_load_config)
         end
     end
 
-    rc, re = policy.init(info)
+    rc, re = policy.init()
     if not rc then
         return false, e:cat(re)
     end
@@ -1244,7 +1232,6 @@ end
 
 --- select (mark) results based upon a list of results usually given on the
 -- command line. Parameters are assigned to all selected results.
--- @param info the info structure
 -- @param results table: list of result names
 -- @param force_rebuild bool
 -- @param keep_chroot bool
@@ -1252,7 +1239,7 @@ end
 -- @param playground bool
 -- @return bool
 -- @return an error object on failure
-function e2tool.select_results(info, results, force_rebuild, keep_chroot, build_mode, playground)
+function e2tool.select_results(results, force_rebuild, keep_chroot, build_mode, playground)
     local rc, re, res, settings
 
     for _,resultname in ipairs(results) do
@@ -1320,11 +1307,10 @@ function e2tool.build_results(resultv)
 end
 
 --- Print selection status for a list of results
--- @param info
 -- @param resultvec table: list of result names
 -- @return bool
 -- @return an error object on failure
-function e2tool.print_selection(info, resultvec)
+function e2tool.print_selection(resultvec)
     for _,resultname in ipairs(resultvec) do
         local e = err.new("error printing selected results")
         local res = result.results[resultname]
index 60fb12c858f6915f33bd54257665f6af5afb31c8..18a34dacb5af73b9ee976f27ed7628e1b770e265 100644 (file)
@@ -119,10 +119,9 @@ end
 
 --- Load project licence config, validate, and populate the licences,
 -- licences_sorted tables with licence objects.
--- @param info Info table.
 -- @return True on success, false on error
 -- @return Error object on failure.
-function licence.load_licence_config(info)
+function licence.load_licence_config()
     local rc, re, e
     local path, ltable
 
index 186e5068336564b72d54df82199f8464892df624..5430550b246929c175f996e2a257e2f69f33ac83 100644 (file)
@@ -148,10 +148,9 @@ local function buildid_scratch(buildid)
 end
 
 --- Initialize policy module.
--- @param info Info table.
 -- @return True on success, false on error.
 -- @return Error object on failure.
-function policy.init(info)
+function policy.init()
     local e = err.new("checking policy")
 
     -- check if all required servers exist
index 75b5f7b56ce6292ef876334e202476beaa47b4c9..4dfb1af9d2d18fc5525f732070c34f5bc4ccfb0e 100644 (file)
@@ -154,10 +154,9 @@ end
 
 --- Initialise the project module, load and check proj/config. Needs to be
 -- called before using name() etc.
--- @param info Info table.
 -- @return True on success, false on error.
 -- @return Error object on failure.
-function project.load_project_config(info)
+function project.load_project_config()
     local rc, re, e
     local path, prj
 
@@ -247,10 +246,6 @@ function project.chroot_arch()
 end
 
 function project.chroot_call_prefix()
-    local info
-    info = e2tool.info()
-    assert(info)
-
     if project.chroot_arch() == "x86_32" then
        return e2lib.join(e2tool.root(), ".e2/bin/e2-linux32")
     end
@@ -312,7 +307,7 @@ end
 -- value after the first call.
 -- @return Project ID or false on error.
 -- @return Error object on failure
-function project.projid(info)
+function project.projid()
     local re, hc, cs
 
     if _projid_cache then
index 606826afc316bf1bd589e73d98ff9c0755724ae9..de51d5b6e1354759b43bc860ceebb3f467921956 100644 (file)
@@ -126,7 +126,6 @@ local function _load_env_config(file)
         end
     end
 
-    local info = e2tool.info()
     local path = e2lib.join(e2tool.root(), file)
 
     local mt = {
index b2a53db94aa745d06b5b5a8aa7737e8aec065be4..0649ea5ca0a8a537ad390546342b8fbd646f8164 100644 (file)
@@ -206,7 +206,7 @@ function result.result_class:initialize(rawres)
     self._build_settings = false
 
     local e = err.new("in result %s:", self._name)
-    local rc, re, info
+    local rc, re
 
     rc, re = e2lib.vrfy_dict_exp_keys(rawres, "e2result config", {
         "chroot",
@@ -295,9 +295,6 @@ function result.result_class:initialize(rawres)
         end
     end
 
-
-    info = e2tool.info()
-
     if rawres.env and type(rawres.env) ~= "table" then
         e:append("result has invalid `env' attribute")
     else
@@ -365,10 +362,8 @@ end
 
 ---
 function result.result_class:build_config()
-    local rc, re, e, buildid, bc, tmpdir, builddir, info
+    local rc, re, e, buildid, bc, tmpdir, builddir
 
-    info = e2tool.info()
-    assertIsTable(info)
     e = err.new("preparing build config for %s failed", self:get_name())
 
     buildid, re = self:buildid()
@@ -460,7 +455,7 @@ end
 -- @return BuildID or false on error.
 -- @return Error object on failure.
 function result.result_class:buildid()
-    local e, rc, re, info, hc, id, build_mode
+    local e, rc, re, hc, id, build_mode
     build_mode = self:build_mode()
 
     if self._buildid then
@@ -468,7 +463,6 @@ function result.result_class:buildid()
     end
 
     e = err.new("error calculating BuildID for result: %s", self:get_name())
-    info = e2tool.info()
     hc = hash.hash_start()
 
     -- basic_result
@@ -492,7 +486,7 @@ function result.result_class:buildid()
 
     -- chroot
     for groupname in self:chroot_list():iter() do
-        id, re = chroot.groups_byname[groupname]:chrootgroupid(info)
+        id, re = chroot.groups_byname[groupname]:chrootgroupid()
         if not id then
             return false, e:cat(re)
         end
@@ -525,7 +519,7 @@ function result.result_class:buildid()
     end
 
     -- project
-    id, re = project.projid(info)
+    id, re = project.projid()
     if not id then
         return false, e:cat(re)
     end
@@ -572,13 +566,12 @@ end
 -- @section end
 
 --- Gather result paths.
--- @param info Info table.
 -- @param basedir Nil or directory from where to start scanning for more
 --                results. Only for recursion.
 -- @param results Nil or table of result paths. Only for recursion.
 -- @return Table with result paths, or false on error.
 -- @return Error object on failure.
-local function gather_result_paths(info, basedir, results)
+local function gather_result_paths(basedir, results)
     local rc, re
     local currdir, resdir, resconfig, s
 
@@ -601,7 +594,7 @@ local function gather_result_paths(info, basedir, results)
                 table.insert(results, entry)
             else
                 -- try subfolder
-                rc, re = gather_result_paths(info, entry, results)
+                rc, re = gather_result_paths(entry, results)
                 if not rc then
                     return false, re
                 end
@@ -615,7 +608,7 @@ end
 ---
 local function load_rawres(cfg)
     local e, rc, re
-    local rawres, loadcnt, g, path, res, info
+    local rawres, loadcnt, g, path, res
 
     e = err.new("error loading result configuration")
 
@@ -626,7 +619,6 @@ local function load_rawres(cfg)
         return false, e
     end
 
-    info = e2tool.info()
     rawres = nil
     loadcnt = 0
     g = {
@@ -706,13 +698,12 @@ end
 
 --- Search, load and verify all result configs. On success, all results are
 --available as objects in result.results[].
--- @param info Info table
 -- @return True on success, false on error.
 -- @return Error object on failure.
-function result.load_result_configs(info)
+function result.load_result_configs()
     local rc, re, e, configs, res
 
-    configs, re = gather_result_paths(info)
+    configs, re = gather_result_paths()
     if not configs then
         return false, re
     end
index cb801358c27e496be6e1ba94d4678517b8134411..87a2e9a314c738f59f53abd1eeaeae0507c0e6af 100644 (file)
@@ -163,13 +163,12 @@ end
 source.sources = {}
 
 --- Gather source paths.
--- @param info Info table.
 -- @param basedir Nil or directory from where to start scanning for more
 --                sources. Only for recursion.
 -- @param sources Nil or table of source paths. Only for recursion.
 -- @return Table with source paths, or false on error.
 -- @return Error object on failure.
-local function gather_source_paths(info, basedir, sources)
+local function gather_source_paths(basedir, sources)
     local rc, re
     local currdir, sdir, sconfig, s
     sources = sources or {}
@@ -192,7 +191,7 @@ local function gather_source_paths(info, basedir, sources)
                 table.insert(sources, entry)
             else
                 -- try sub directory
-                rc, re = gather_source_paths(info, entry, sources)
+                rc, re = gather_source_paths(entry, sources)
                 if not rc then
                     return false, re
                 end
@@ -205,16 +204,15 @@ end
 
 --- Search, load and verify all source configs. On success, all sources
 --available as objects in source.sources[] etc.
--- @param info Info table
 -- @return True on success, false on error.
 -- @return Error object on failure.
-function source.load_source_configs(info)
+function source.load_source_configs()
     local rc, re, e
     local g, rawsrc, loadcnt, configs, path, src
 
     e = err.new("error loading source configuration")
 
-    configs, re = gather_source_paths(info)
+    configs, re = gather_source_paths()
     if not configs then
         return false, e:cat(re)
     end
@@ -438,8 +436,6 @@ function source.generic_source_validate_server(rawsrc, ismandatory)
     assert(type(rawsrc) == "table" and rawsrc.name and rawsrc.type)
     assert(type(ismandatory) == "boolean")
 
-    local info = e2tool.info()
-
     if ismandatory and rawsrc.server == nil then
         return false, err.new("source has no `server' attribute")
     end
index 1d3f834703be2d1a26ed3c08dd2669934051eb2c..2c673ebe886cccd51c57e3e0c5df099a91c56b77 100644 (file)
@@ -51,7 +51,7 @@ local strict = require("strict")
 -- @return an error object on failure
 local function _build_collect_project(self, res, return_flags)
 
-    local function write_build_driver(info, resultname, destdir)
+    local function write_build_driver(resultname, destdir)
         local rc, re, e, res, bd, buildrc_noinit_file, buildrc_file, bc
         local build_driver_file
 
@@ -295,7 +295,7 @@ local function _build_collect_project(self, res, return_flags)
             return false, e:cat(re)
         end
         -- generate build driver
-        rc, re = write_build_driver(info, depname, destdir)
+        rc, re = write_build_driver(depname, destdir)
         if not rc then
             return false, e:cat(re)
         end
index 037e99ab9bf5463f445618c844d57755834f7d51..daeb90a1dc009c2b695addada906c1780c7e8aa2 100644 (file)
@@ -296,11 +296,10 @@ end
 --------------------------------------------------------------------------------
 
 --- Build the cvsroot string.
--- @param info Info table.
 -- @param sourcename Source name.
 -- @return CVSROOT string or false on error.
 -- @return Error object on failure.
-local function mkcvsroot(info, sourcename)
+local function mkcvsroot(sourcename)
     local cvsroot, src, surl, u, re
 
     src = source.sources[sourcename]
@@ -339,7 +338,7 @@ function cvs.fetch_source(info, sourcename)
         return true
     end
 
-    cvsroot, re = mkcvsroot(info, sourcename)
+    cvsroot, re = mkcvsroot(sourcename)
     if not cvsroot then
         return false, e:cat(re)
     end
@@ -377,7 +376,7 @@ function cvs.prepare_source(info, sourcename, sourceset, buildpath)
     e = err.new("cvs.prepare_source failed")
     src = source.sources[sourcename]
 
-    cvsroot, re = mkcvsroot(info, sourcename)
+    cvsroot, re = mkcvsroot(sourcename)
     if not cvsroot then
         return false, re
     end
index c616eb56759566ab5ee42a21dcb9bf009ee779e8..550073c9b859c77ccdd0eab31dd96a185718d24f 100644 (file)
@@ -273,7 +273,7 @@ function svn.svn_source:sourceid(sourceset)
     assert(type(sourceset) == "string" and #sourceset > 0)
 
     local rc, re
-    local hc, surl, svnurl, argv, out, svnrev, lid, svnrev, info, licences
+    local hc, surl, svnurl, argv, out, svnrev, lid, svnrev, licences
 
     if self._sourceids[sourceset] then
         return self._sourceids[sourceset]
@@ -293,9 +293,6 @@ function svn.svn_source:sourceid(sourceset)
         hash.hash_append(hc, lid)
     end
 
-    info = e2tool.info()
-    assert(type(info) == "table")
-
     surl, re = cache.remote_url(cache.cache(), self._server, self._location)
     if not surl then
         return false, re