NEXT:
+ * Removed lazytag build mode, it was deprecated for a long time
* Fix error in cvs source if cvsroot unset
e2factory-2.3.16p0
-- @return git refs string, or false on error.
-- @return Error object on failure.
function generic_git.sourceset2ref(sourceset, branch, tag)
- if sourceset == "branch" or (sourceset == "lazytag" and tag == "^") then
+ if sourceset == "branch" then
return string.format("refs/heads/%s", branch)
- elseif sourceset == "tag" or (sourceset == "lazytag" and tag ~= "^") then
+ elseif sourceset == "tag" then
return string.format("refs/tags/%s", tag)
end
local hash = require("hash")
local strict = require("strict")
---- Get the source set identifier.
--- @return string: the source set identifier
-local function source_set_lazytag()
- return "lazytag"
-end
-
--- Get the source set identifier.
-- @return string: the source set identifier
local function source_set_tag()
function policy.default_build_mode(mode)
local build_mode = {}
- if mode == "lazytag" then
- build_mode.source_set = source_set_lazytag
- build_mode.buildid = buildid_buildid
- build_mode.storage = storage_default
- build_mode.deploy = false
- elseif mode == "tag" then
+ if mode == "tag" then
build_mode.source_set = source_set_tag
build_mode.buildid = buildid_buildid
build_mode.storage = storage_default
hash.hash_append(hc, lid)
end
-- cvs specific
- if sourceset == "tag" and self._tag ~= "^" then
+ if sourceset == "tag" then
-- we rely on tags being unique with cvs
hash.hash_append(hc, self._tag)
else
"-r",
}
- if sourceset == "branch" or
- (sourceset == "lazytag" and self:get_tag() == "^") then
+ if sourceset == "branch" then
table.insert(argv, self:get_branch())
- elseif (sourceset == "tag" or sourceset == "lazytag") and
- self:get_tag() ~= "^" then
+ elseif sourceset == "tag" then
table.insert(argv, self:get_tag())
else
return false, e:cat(err.new("source set not allowed"))
gitdir = e2lib.join(e2tool.root(), self:get_working(), ".git")
- if sourceset == "branch" or (sourceset == "lazytag" and self:get_tag() == "^") then
+ if sourceset == "branch" then
ref = string.format("refs/heads/%s", self:get_branch())
rc, re, id = generic_git.lookup_id(gitdir, false, ref)
if not rc then
return false, e:cat(re)
end
- elseif sourceset == "tag" or (sourceset == "lazytag" and self:get_tag() ~= "^") then
+ elseif sourceset == "tag" then
ref = string.format("refs/tags/%s", self:get_tag())
rc, re, id = generic_git.lookup_id(gitdir, false, ref)
git_argv = generic_git.git_new_argv(gitdir, srcdir, "archive")
table.insert(git_argv, "--format=tar")
- if sourceset == "branch" or
- (sourceset == "lazytag" and self:get_tag() == "^") then
+ if sourceset == "branch" then
table.insert(git_argv, "refs/heads/" .. self:get_branch())
- elseif sourceset == "tag" or
- (sourceset == "lazytag" and self:get_tag() ~= "^") then
+ elseif sourceset == "tag" then
table.insert(git_argv, "refs/tags/" .. self:get_tag())
else
error(err.new("invalid sourceset: %s", sourceset))
elseif sourceset == "branch" then
hash.hash_append(hc, self._branch)
argv = { "info", svnurl.."/"..self._branch }
- elseif sourceset == "lazytag" then
- return false, err.new("svn source does not support lazytag mode")
else
return false,
err.new("svn sourceid can't handle sourceset %q", sourceset)