rc = cache.new_cache_entry(info.cache, info.proj_storage_server_name,
nil, nil, info.default_repo_server, info.project_location)
- -- prefix the chroot call with this tool (switch to 32bit on amd64)
- -- XXX not in buildid, as it is filesystem location dependent...
- info.chroot_call_prefix = {}
- info.chroot_call_prefix["x86_32"] =
- e2lib.join(info.root, ".e2/bin/e2-linux32")
- -- either we are on x86_64 or we are on x86_32 and refuse to work anyway
- -- if x86_64 mode is requested.
- info.chroot_call_prefix["x86_64"] = ""
-
local f = e2lib.join(info.root, e2lib.globals.e2version_file)
local v, re = e2lib.parse_e2versionfile(f)
if not v then
-- more details.
local project = {}
+package.loaded["project"] = project
local buildconfig = require("buildconfig")
local e2lib = require("e2lib")
e2lib.warnf("WDEFAULT", " chroot_arch defaults to x86_32")
prj.chroot_arch = "x86_32"
end
- if not info.chroot_call_prefix[prj.chroot_arch] then
- return false, err.new("chroot_arch is set to an invalid value")
+
+ if prj.chroot_arch ~= "x86_32" and prj.chroot_arch ~= "x86_64" then
+ return false, err.new("chroot_arch is set to an unknown architecture")
end
-- get host system architecture
return _prj.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(info.root, ".e2/bin/e2-linux32")
+ end
+
+ return ""
+end
+
--- Iterator that returns the deploy results as string.
-- @return Iterator function.
function project.deploy_results_iter()