]> git.e2factory.org Git - e2factory.git/commitdiff
policy: remove all traces of dep_set()
authorTobias Ulmer <tu@emlix.com>
Tue, 6 Sep 2016 16:02:12 +0000 (18:02 +0200)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:18 +0000 (15:41 +0100)
dep_set() used to point to the location of a dependent result in the out
directory when said result was built in working-copy mode. Since the
introduction of stable "scratch-hash" style BuildID's this has been
unnecessary.

Signed-off-by: Tobias Ulmer <tu@emlix.com>
local/e2build.lua
local/policy.lua

index c0cbb9b80801a474f893e14cd06ee5c89f368ece..3dc1144fe454b74a71d70274a80ea947be2b3f79 100644 (file)
@@ -228,9 +228,8 @@ function e2build.build_process_class:_result_available(res, return_flags)
 
     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
@@ -530,7 +529,7 @@ end
 
 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())
@@ -542,15 +541,13 @@ function e2build.build_process_class:helper_unpack_result(res, dep, destdir)
         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)
index 6456ef756a453ac8ed4b1ad9a683a3c99c1c04e2..2db605d845f85e6b186d8594cc772fb732f339b5 100644 (file)
@@ -97,20 +97,6 @@ local function deploy_storage_default(location, release_id)
     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
@@ -284,7 +270,6 @@ end
 --- 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.
@@ -298,32 +283,27 @@ function policy.default_build_mode(mode)
 
     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