From: Gordon Hecker Date: Wed, 5 May 2010 12:23:24 +0000 (+0200) Subject: deployment: enable deployment through the deploy_results attribute in proj/config X-Git-Tag: e2factory-2.3.6~13 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=c6d0ddc77b8ce3e714c5408076f5ab94954b2e66;p=e2factory.git deployment: enable deployment through the deploy_results attribute in proj/config Signed-off-by: Gordon Hecker --- diff --git a/doc/manual/project.text b/doc/manual/project.text index 9bb3f1b..9779f93 100644 --- a/doc/manual/project.text +++ b/doc/manual/project.text @@ -13,6 +13,7 @@ The table must specify the following keys: * release_id string: release identifier * name string: project name * default_results table: list of results to build by default +* deploy_results table: list of results to deploy to archive in release mode The table may specify the following additional keys: @@ -31,6 +32,9 @@ Example: name = "foo", release_id = "foo-1.0beta", default_results = { "foo" }, + deploy_results = { + "bar", + }, chroot_arch = "x86_32", } diff --git a/local/e2build.lua b/local/e2build.lua index 5ce6452..02640f9 100644 --- a/local/e2build.lua +++ b/local/e2build.lua @@ -1233,6 +1233,10 @@ function deploy(info, r, return_flags) e2lib.logf(1, "deployment disabled for this build mode") return true end + if not res._deploy then + e2lib.logf(1, "deployment disabled for this result") + return true + end local files = {} for f in e2lib.directory("result/files") do table.insert(files, string.format("files/%s", f)) diff --git a/local/e2tool.lua b/local/e2tool.lua index 5d75b56..886bb53 100644 --- a/local/e2tool.lua +++ b/local/e2tool.lua @@ -579,6 +579,11 @@ The newest configuration syntax supported by the tools is %s. "default_results ist not set. Defaulting to empty list.") info.project.default_results = {} end + rc, re = listofstrings(info.project.deploy_results, true, true) + if not rc then + e:append("deploy_results ist not a valid list of strings") + e:cat(re) + end rc, re = listofstrings(info.project.default_results, true, false) if not rc then e:append("default_results ist not a valid list of strings") @@ -807,6 +812,11 @@ function check_project_info(info, all, access, verbose) e:append("default_results: No such result: %s", r) end end + for _, r in ipairs(info.project.deploy_results) do + if not info.results[r] then + e:append("deploy_results: No such result: %s", r) + end + end if e:getcount() > 1 then return false, e end @@ -1957,6 +1967,12 @@ function check_result(info, resultname) res.bn = {} res.buildno = "0" end + for _,r in ipairs(info.project.deploy_results) do + if r == resultname then + res._deploy = true + break + end + end local build_script = string.format("%s/%s", info.root, resultbuildscript(info.results[resultname].directory)) if not e2lib.isfile(build_script) then