+--- Cache
+-- @module generic.cache
+
--[[
e2factory, the emlix embedded build system
-- @param c the cache data structure
-- @param server the server to fetch the file from
-- @param location the location on the server
+-- @param flags
-- @return bool
-- @return an error object on failure
function cache.writeback(c, server, location, flags)
-- @param c the cache data structure
-- @param server the server to fetch the file from
-- @param location the location on the server
+-- @param flags
-- @return bool
-- @return an error object on failure
function cache.cache_file(c, server, location, flags)
-- @param c the cache data structure
-- @param server the server where the file is located
-- @param location the location on the server
+-- @param flags unused parameter
-- @return string the path to the cached file, nil on error
-- @return an error object on failure
function cache.file_path(c, server, location, flags)
+--- Utility and Helper Library
+-- @module generic.e2lib
+
--[[
e2factory, the emlix embedded build system
-- is true
-- @param level number: loglevel
-- @param msg string: log message
--- @param ... strings: arguments required for the format string
--- @return nil
function e2lib.log(level, msg)
if level < 1 or level > 4 then
bomb("invalid log level")
end
io.stderr:write(msg .. "\n")
end
- return nil
end
function e2lib.rotate_log(file)
end
--- translate filename suffixes to valid tartypes for e2-su-2.2
--- @filename string: filename
+-- @param filename string: filename
-- @return string: tartype, or nil on failure
-- @return an error object on failure
function e2lib.tartype_by_suffix(filename)
--- read the local extension configuration
-- This function must run while being located in the projects root directory
--- @param root string: path to project
-- @return the extension configuration table
-- @return an error object on failure
function e2lib.read_extension_config()
--- call the touch tool with flags and filename
-- @param file string: the file parameter
-- @param flags string: flags to pass to touch (optional)
--- @returns bool
+-- @return bool
function e2lib.touch(file, flags)
if not flags then
flags = ""
end
--- call the ln command
--- @param destination string: destination name
+-- @param dst string: destination name
-- @param link string: link name
-- @return bool
-- @return the last line of captured output
--- parse a server:location string, taking a default server into account
-- @param arg string: the string to parse
--- @param dafault server string: the default server name
+-- @param default_server string: the default server name
-- @return a table with fields server and location, nil on error
-- @return nil, an error string on error
function e2lib.parse_server_location(arg, default_server)
+--- Option Parser
+-- @module generic.e2option
+
--[[
e2factory, the emlix embedded build system
+--- Error Object
+-- @module generic.err
+
--[[
e2factory, the emlix embedded build system
--- get the error counter
-- @param e the error object
+-- @param n unused
-- @return number: the error counter
function err.getcount(e, n)
return e.count
+--- Git
+-- @module generic.generic_git
+
--[[
e2factory, the emlix embedded build system
--- clone a git repository
-- @param surl url to the server
-- @param location location relative to the server url
+-- @param destdir
-- @param skip_checkout bool: pass -n to git clone?
-- @return true on success, false on error
-- @return nil, an error object on failure
end
--- clone a git repository by server and location
--- @param cache
+-- @param c
-- @param server
-- @param location
-- @param destdir string: destination directory
end
--- verify that HEAD matches the given tag
--- @param gitdir string: gitdir (optional, default: .git)
--- @param tag string: tag name
+-- @param gitwc string: gitdir (optional, default: .git)
+-- @param verify_tag string: tag name
-- @return bool, or nil on error
-- @return an error object on failure
function generic_git.verify_head_match_tag(gitwc, verify_tag)
-- @param llocation string: working copy location on local server
-- @param rserver string: remote server
-- @param rlocation string: repository location on remote server
--- @param flags: table of flags
+-- @param flags table of flags
-- @return bool
-- @return nil, or an error string on error
function generic_git.new_repository(c, lserver, llocation, rserver, rlocation, flags)
+--- Hash
+-- @module generic.hash
+
--[[
e2factory, the emlix embedded build system
+--- Locking module.
+--
+-- This module maintains lock directories within a lock context.
+-- Remaining lock directories can be removed by calling the cleanup
+-- method.
+--
+-- @module generic.lock
+
--[[
e2factory, the emlix embedded build system
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
---- This module maintains lock directories within a lock context.
--- Remaining lock directories can be removed by calling the cleanup
--- method.
local lock = {}
local err = require("err")
local e2lib = require("e2lib")
+--- File handling.
+-- @module generic.luafile
+
--[[
e2factory, the emlix embedded build system
+--- Plugin Loader.
+-- @module generic.plugin
+
--[[
e2factory, the emlix embedded build system
--- load a plugin
-- @param dir string: plugin directory
--- @param plugin_file string: filename
+-- @param p string: plugin filename
-- @param ctx table: plugin context
-- @return bool
-- @return an error object on failure
+--- Strict table handling.
+-- @module generic.strict
+
--[[
e2factory, the emlix embedded build system
+--- External Tools Support.
+-- @module generic.tools
+
--[[
e2factory, the emlix embedded build system
+--- Transport Backend
+-- @module generic.transport
+
--[[
e2factory, the emlix embedded build system
-- @param opts table: options vector to pass to rsync
-- @param user string: optional username or nil
-- @param server string: the server part of the directory to create
--- @param directory string: the directory to create on the server
+-- @param dir string: the directory to create on the server
-- @return bool
-- @return an error object on failure
local function rsync_ssh_mkdir(opts, user, server, dir)
+--- URL Parser.
+-- @module generic.url
+
--[[
e2factory, the emlix embedded build system
+--- e2-create-project command
+-- @module global.e2-create-project
+
--[[
e2factory, the emlix embedded build system
+--- e2-fetch-project command
+-- @module global.e2-fetch-project
+
--[[
e2factory, the emlix embedded build system
+--- e2-install-e2 command
+-- @module global.e2-install-e2
+
--[[
e2factory, the emlix embedded build system
+--- e2 command
+-- @module global.e2
+
--[[
e2factory, the emlix embedded build system
+--- CVS Plugin
+-- @module local.cvs
+
--[[
e2factory, the emlix embedded build system
+--- e2-build command
+-- @module local.e2-build
+
--[[
e2factory, the emlix embedded build system
+--- e2-cf command
+-- @module local.e2-cf
+
--[[
e2factory, the emlix embedded build system
+--- e2-dlist command
+-- @module local.e2-dlist
+
--[[
e2factory, the emlix embedded build system
+--- e2-dlist command
+-- @module local.e2-dlist
+
--[[
e2factory, the emlix embedded build system
+--- e2-fetch-source command
+-- @module local.e2-fetch-source
+
--[[
e2factory, the emlix embedded build system
+--- e2-ls-project command
+-- @module local.e2-ls-project
+
--[[
e2factory, the emlix embedded build system
+--- e2-new-source command
+-- @module local.e2-new-source
+
--[[
e2factory, the emlix embedded build system
--- generate a sha1 checksum file
-- @param source_file string: source file name
--- @param checksum_file: checksum file name
+-- @param checksum_file checksum file name
-- @return bool
-- @return nil, an error string on error
local function write_checksum_file_sha1(source_file, checksum_file)
+--- e2-playground command
+-- @module local.e2-playground
+
--[[
e2factory, the emlix embedded build system
+--- Core build logic
+-- @module local.e2build
+
--[[
e2factory, the emlix embedded build system
--- build a result
-- @param info
-- @param result string: result name
+-- @param return_flags
-- @return bool
-- @return an error object on failure
local function build_result(info, result, return_flags)
-- sources being the result collecting the project:
-- the results sources and iso won't be included, as that would lead to
-- an impossibility to calculate buildids (infinite recursion)
--- @param c table: build context
+-- @param info info table
+-- @param r
+-- @param return_flags
-- @return bool
-- @return an error object on failure
local function collect_project(info, r, return_flags)
+--- Core data structure manipulation
+-- @module local.e2tool
+
--[[
e2factory, the emlix embedded build system
-- @field filename string: config file name
--- load config file and return a list of config item tables
+-- @param info info table
-- @param path string: file to load
--- @param type list of strings: allowed config types
+-- @param types list of strings: allowed config types
-- @return list of config items
-- @return an error object on failure
local function load_user_config2(info, path, types)
--- calculate a representation for file content. The name and location
-- attributes are not included.
+-- @param info info table
-- @param file table: file table from configuration
-- @return fileid string: hash value, or nil
-- @return an error object on failure
-- XXX this function always succeeds or aborts
-- @param info
-- @param resultname
--- @param mode
-- @return the buildid
function e2tool.buildid(info, resultname)
e2lib.log(4, string.format("get buildid for %s", resultname))
end
--- parse build numbers from a string and store to the build number table
--- @param info: the info table
+-- @param info the info table
-- @param s string: the string to parse
-- @param build_numbers table: build number table (optional)
-- @return bool
--- serialize the build number table suitable for storage or network
-- transport
--- @param info: the info table
+-- @param info info table
-- @param build_numbers table: build number table (optional)
-- @return s string: serialized build numbers, or nil
-- @return nil, an error object on error
+--- Environment Manipulation
+-- @module local.environment
+
--[[
e2factory, the emlix embedded build system
+--- Files Plugin
+-- @module local.files
+
--[[
e2factory, the emlix embedded build system
+--- Git Plugin
+-- @module local.git
+
--[[
e2factory, the emlix embedded build system
--- prepare a git source
-- @param info the info structure
-- @param sourcename string
+-- @param sourceset
+-- @param buildpath
-- @return bool
-- @return nil on success, an error string on error
function git.prepare_source(info, sourcename, sourceset, buildpath)
--- calculate an id for a source
-- @param info
-- @param sourcename
+-- @param sourceset
-- @return string: the sourceid, or nil
-- @return an error string
function git.sourceid(info, sourcename, sourceset)
+--- Policy
+-- @module local.policy
+
--[[
e2factory, the emlix embedded build system
+--- SCM Interface
+-- @module local.scm
+
--[[
e2factory, the emlix embedded build system
+--- Subversion Plugin
+-- @module local.svn
+
--[[
e2factory, the emlix embedded build system
--- calculate an id for a source
-- @param info
-- @param sourcename
+-- @param source_set
function svn.sourceid(info, sourcename, source_set)
local src = info.sources[sourcename]
local rc, e