From dee353956cca468a1164361f7170536baa220c7e Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Tue, 28 May 2013 16:44:17 +0200 Subject: [PATCH] Use info.project instead Signed-off-by: Tobias Ulmer --- local/e2-ls-project.lua | 4 ++-- local/e2build.lua | 20 ++++++++++---------- local/e2tool.lua | 10 +++++----- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/local/e2-ls-project.lua b/local/e2-ls-project.lua index dc8f271..9363f81 100644 --- a/local/e2-ls-project.lua +++ b/local/e2-ls-project.lua @@ -168,7 +168,7 @@ local function e2_ls_project(arg) if opts.dot or opts["dot-sources"] then local arrow = "->" - print("digraph \"" .. info.name .. "\" {") + print("digraph \"" .. info.project.name .. "\" {") for _, r in pairs(results) do local res = info.results[r] local deps = e2tool.dlist(info, r) @@ -205,7 +205,7 @@ local function e2_ls_project(arg) --------------- project name local s1 = "|" local s2 = "|" - p0(s1, s2, info.name) + p0(s1, s2, info.project.name) --------------- servers local s1 = "|" diff --git a/local/e2build.lua b/local/e2build.lua index ec1fb40..f1f0c0b 100644 --- a/local/e2build.lua +++ b/local/e2build.lua @@ -48,7 +48,7 @@ local function linklast(info, r, return_flags) local e = err.new("creating link to last results") -- calculate the path to the result local server, location = res.build_mode.storage(info.project_location, - info.release_id) + info.project.release_id) local location1 = string.format("%s/%s/%s", location, r, e2tool.buildid(info, r)) local cache_flags = { @@ -117,7 +117,7 @@ local function result_available(info, r, return_flags) return true, nil end local server, location = - res.build_mode.storage(info.project_location, info.release_id) + res.build_mode.storage(info.project_location, info.project.release_id) local dep_set = res.build_mode.dep_set(buildid) -- cache the result @@ -200,7 +200,7 @@ function e2build.build_config(info, r) local tmpdir = string.format("%s/e2factory-%s.%s.%s-build/%s", e2lib.globals.tmpdir, buildconfig.MAJOR, buildconfig.MINOR, buildconfig.PATCHLEVEL, e2lib.globals.username) - local project = info.name + local project = info.project.name local builddir = "tmp/e2" tab.mode = nil -- XXX tab.location = nil -- XXX info.project_location @@ -492,8 +492,8 @@ function e2build.unpack_result(info, r, dep, destdir) end local dep_set = d.build_mode.dep_set(buildid) - local server, location = d.build_mode.storage(info.project_location, - info.release_id) + local server, location = + d.build_mode.storage(info.project_location, info.project.release_id) e2lib.logf(3, "searching for dependency %s in %s:%s", dep, server, location) local location1 = string.format("%s/%s/%s/result.tar", location, dep, dep_set) @@ -839,8 +839,8 @@ local function deploy(info, r, return_flags) table.insert(files, string.format("files/%s", f)) end table.insert(files, "checksums") - local server, location = res.build_mode.deploy_storage(info.project_location, - info.release_id) + local server, location = res.build_mode.deploy_storage( + info.project_location, info.project.release_id) -- do not re-deploy if this release was already done earlier local location1 = string.format("%s/%s/checksums", location, r) @@ -950,7 +950,7 @@ local function store_result(info, r, return_flags) return false, e:cat(re) end local server, location = res.build_mode.storage(info.project_location, - info.release_id) + info.project.release_id) local buildid, re = e2tool.buildid(info, r) if not buildid then @@ -1099,8 +1099,8 @@ local function collect_project(info, r, return_flags) if not f then return false, e:cat(re) end - f:write(string.format("name='%s'\n", info.name)) - f:write(string.format("release_id='%s'\n", info.release_id)) + f:write(string.format("name='%s'\n", info.project.name)) + f:write(string.format("release_id='%s'\n", info.project.release_id)) f:write(string.format("default_results='%s'\n", res.collect_project_default_result)) f:write(string.format("chroot_arch='%s'\n", diff --git a/local/e2tool.lua b/local/e2tool.lua index 97dae96..efa7ee4 100644 --- a/local/e2tool.lua +++ b/local/e2tool.lua @@ -1486,7 +1486,7 @@ function e2tool.collect_project_info(info, skip_load_config) if e2option.opts["check"] then e2tool.lcd(info, ".") - rc, re = generic_git.verify_head_match_tag(nil, info.release_id) + rc, re = generic_git.verify_head_match_tag(nil, info.project.release_id) if rc == nil then return false, e:cat(re) end @@ -1506,7 +1506,7 @@ function e2tool.collect_project_info(info, skip_load_config) end if e2option.opts["check-remote"] then - rc, re = generic_git.verify_remote_tag(nil, info.release_id) + rc, re = generic_git.verify_remote_tag(nil, info.project.release_id) if not rc then e:append("verifying remote tag failed") return false, e:cat(re) @@ -1806,7 +1806,7 @@ end -- by INFO, topologically sorted according to the projects dependency -- information. function e2tool.dsort(info) - return e2tool.dlist_recursive(info, info.default_results) + return e2tool.dlist_recursive(info, info.project.default_results) end --- read hash file. @@ -1920,8 +1920,8 @@ local function projid(info) hc:hash_line(fileid) -- the file content end end - hc:hash_line(info.release_id) - hc:hash_line(info.name) + hc:hash_line(info.project.release_id) + hc:hash_line(info.project.name) hc:hash_line(info.project.chroot_arch) hc:hash_line(buildconfig.VERSION) info.projid = hc:hash_finish() -- 2.39.5