tab.buildrc_noinit_file = string.format("buildrc-noinit")
tab.profile = string.format("/tmp/bashrc")
tab.builtin_env = environment.new()
- tab.builtin_env:set("E2_BUILD_NUMBER", res.buildno)
tab.builtin_env:set("E2_TMPDIR", res.build_config.Tc)
tab.builtin_env:set("E2_RESULT", r)
tab.builtin_env:set("E2_RELEASE_ID", info.project.release_id)
end
-- generate builtin environment script
local file = string.format("%s/builtin", destdir)
- rc, re = write_environment_script(
- rn.build_config.builtin_env, file)
+ rc, re = write_environment_script(rn.build_config.builtin_env, file)
if not rc then
return false, e:cat(re)
end
end
end
end
- if not res.buildno then
- res.bn = {}
- res.buildno = "0"
- end
for _,r in ipairs(info.project.deploy_results) do
if r == resultname then
res._deploy = true
return false, e
end
local hc = hash.hash_start()
- hc:hash_line(r.buildno)
hc:hash_line(r.pbuildid)
r.buildid = hc:hash_finish()
return r.build_mode.buildid(r.buildid)
-- @param info
-- @param r string: the result name
-- @param force_rebuild bool
--- @param request_buildno bool
-- @param keep_chroot bool
-- @param build_mode table: build mode policy
-- @param playground bool
-- @return True on success, false on error.
-- @return Error object on failure.
-local function select_result(info, r, force_rebuild, request_buildno, keep_chroot, build_mode, playground)
+local function select_result(info, r, force_rebuild, keep_chroot, build_mode, playground)
local rc, re = e2tool.verify_src_res_name_valid_chars(r)
if not rc then
return false, err.new("'%s' is not a valid result name", r)
end
res.selected = true
res.force_rebuild = force_rebuild
- res.request_buildno = request_buildno
res.keep_chroot = keep_chroot
if build_mode then
res.build_mode = build_mode
-- @param info the info structure
-- @param results table: list of result names
-- @param force_rebuild bool
--- @param request_buildno bool
-- @param keep_chroot bool
-- @param build_mode table: build mode policy. Optional.
-- @param playground bool
-- @return bool
-- @return an error object on failure
-function e2tool.select_results(info, results, force_rebuild, request_buildno, keep_chroot, build_mode, playground)
+function e2tool.select_results(info, results, force_rebuild, keep_chroot, build_mode, playground)
local rc, re
for _,r in ipairs(results) do
- rc, re = select_result(info, r, force_rebuild, request_buildno,
- keep_chroot, build_mode, playground)
+ rc, re = select_result(info, r, force_rebuild, keep_chroot, build_mode,
+ playground)
if not rc then
return false, re
end
end
local s = res.selected and "[ selected ]" or "[dependency]"
local f = res.force_rebuild and "[force rebuild]" or ""
- local b = res.request_buildno and "[request buildno]" or ""
local p = res.playground and "[playground]" or ""
- e2lib.logf(3, "Selected result: %-20s %s %s %s %s", r, s, f, b, p)
+ e2lib.logf(3, "Selected result: %-20s %s %s %s", r, s, f, p)
end
return true, nil
end