local server, location =
res:build_mode().storage(info.project_location, project.release_id())
- local dep_set = res:build_mode().dep_set(buildid)
local result_location = e2lib.join(location, res:get_name(),
- dep_set, "result.tar")
+ buildid, "result.tar")
rc, re = cache.file_exists(info.cache, server, result_location)
if re then
function e2build.build_process_class:helper_unpack_result(res, dep, destdir)
local rc, re, e
- local info, buildid, dep_set, server, location, resulttarpath, tmpdir
+ local info, buildid, server, location, resulttarpath, tmpdir
local path, resdir, dt, filesdir
e = err.new("unpacking result failed: %s", dep:get_name())
return false, e:cat(re)
end
- dep_set = dep:build_mode().dep_set(buildid)
-
server, location =
dep:build_mode().storage(info.project_location, project.release_id())
e2lib.logf(3, "searching for dependency %s in %s:%s",
dep:get_name(), server, location)
- resulttarpath = e2lib.join(location, dep:get_name(), dep_set, "result.tar")
+ resulttarpath = e2lib.join(location, dep:get_name(), buildid, "result.tar")
path, re = cache.fetch_file_path(info.cache, server, resulttarpath)
if not path then
return false, e:cat(re)
return "releases", string.format("%s/archive/%s", location, release_id)
end
----
--- @param buildid the buildid
--- @return the buildid
-local function dep_set_buildid(buildid)
- return buildid
-end
-
----
--- @param buildid the buildid
--- @return the buildid
-local function dep_set_last(buildid)
- return "last"
-end
-
--- Get the buildid for a build
-- @param buildid the buildid
-- @return the buildid
--- Build mode table for each result.
-- @table build_mode
-- @field source_set
--- @field dep_set
-- @field buildid
-- @field storage
-- @field deploy Boolean value, decides whether a result should be deployed.
if mode == "lazytag" then
build_mode.source_set = source_set_lazytag
- build_mode.dep_set = dep_set_buildid
build_mode.buildid = buildid_buildid
build_mode.storage = storage_default
build_mode.deploy = false
elseif mode == "tag" then
build_mode.source_set = source_set_tag
- build_mode.dep_set = dep_set_buildid
build_mode.buildid = buildid_buildid
build_mode.storage = storage_default
build_mode.deploy = false
elseif mode == "release" then
build_mode.source_set = source_set_tag
- build_mode.dep_set = dep_set_buildid
build_mode.buildid = buildid_buildid
build_mode.storage = storage_release
build_mode.deploy = true
build_mode.deploy_storage = deploy_storage_default
elseif mode == "branch" then
build_mode.source_set = source_set_branch
- build_mode.dep_set = dep_set_buildid
build_mode.buildid = buildid_buildid
build_mode.storage = storage_default
build_mode.deploy = false
elseif mode == "working-copy" then
build_mode.source_set = source_set_working_copy
- build_mode.dep_set = dep_set_last
build_mode.buildid = buildid_scratch
build_mode.storage = storage_local
build_mode.deploy = false