return true, nil, cf
end
+--- Check whether islocal is enabled or not.
+-- @param c cache table.
+-- @param server server name.
+-- @param flags cache flags.
+-- @return True if local, false if not.
+-- @return Error object on error.
function cache.islocal_enabled(c, server, flags)
assertIsTable(c)
assertIsStringN(server)
local tools = require("tools")
local trace = require("trace")
+--- Various global settings
+-- @table globals
e2lib.globals = strict.lock({
logflags = {
{ "v1", true }, -- minimal
local aliases = {}
local optionlist = {} -- ordered list of option names
+--- e2option.parse() result is stored in this table for later reference.
+-- @table opts
e2option.opts = {}
--- register a flag option
aliases[alias] = option
end
+--- Sets up default options for all commands.
local function defaultoptions()
local category = "Verbosity Control Options"
e2option.option("e2-config", "specify configuration file", nil,
category)
end
+--- Load user default options if set in $HOME/.e2/e2rc
local function userdefaultoptions(opts)
local home = e2lib.globals.osenv["HOME"]
if not home then
chroot.groups_sorted = {}
--- Chroot class.
--- @see generic.class
+-- @type chroot
chroot.chroot = class("chroot")
--- Chroot group object constructor.
self._chrootgroupid = hash.hash_finish(hc)
return self._chrootgroupid
end
+--- @section end
--- Load and validate chroot configuration. Populates chroot.groups_byname,
-- chroot.groups_sorted and chroot.groups_default.
e2lib.umask(_chroot_umask)
end
--- set umask back to the value used on the host
+--- set umask back to the value used on the host
function e2tool.reset_umask()
e2lib.umask(_host_umask)
end
--- initialize the umask set/reset mechanism (i.e. store the host umask)
+--- initialize the umask set/reset mechanism (i.e. store the host umask)
local function init_umask()
-- save the umask value we run with
_host_umask = e2lib.umask(_chroot_umask)
return result.results[resultname]:buildid()
end
---- select results based upon a list of results usually given on the
+--- select (mark) results based upon a list of results usually given on the
-- command line. Parameters are assigned to all selected results.
-- @param info the info structure
-- @param results table: list of result names
return true
end
+--- Build all results in resultv in-order.
+-- @param resultv Result name vector.
+-- @return True on success, false on error.
+-- @return Error object on failure.
function e2tool.build_results(resultv)
e2lib.logf(3, "building results")
return true
end
---- print selection status for a list of results
+--- Print selection status for a list of results
-- @param info
-- @param resultvec table: list of result names
-- @return bool
local projenv = require("projenv")
local strict = require("strict")
---- Licence base class.
--- @see generic.class
-licence.licence = class("licence")
-
--- Dictionary of loaded licence objects, indexed by name.
licence.licences = {}
+
--- Vector of loaded licence objects, sorted by name.
licence.licences_sorted = {}
+--- Licence base class.
+-- @type licence
+licence.licence = class("licence")
+
--- Create a new licence object.
-- @param name Licence name string.
-- @return May throw error(err) on invalid input.
return self._licenceid
end
+--- @section end
--- Load project licence config, validate, and populate the licences,
-- licences_sorted tables with licence objects.
-- @param buildid the buildid
-- @return the buildid
local function buildid_scratch(buildid)
- --- XXX: Always returning a fixed buildid string does not work when
+ -- XXX: Always returning a fixed buildid string does not work when
-- the scratch results gets used by results not in scratch mode.
-- eg. if we have a result graph like this: root->tag->wc-mode->tag
-- the final tag would only be built once and then cached globally.
local e2lib = require("e2lib")
local strict = require("strict")
---- String list class that keeps entries in sorted order
--- while ignoring duplicate entries.
--- Trying to use string list with anything but strings throws an exception.
+--- String list.
+-- String list class that keeps entries in sorted order while ignoring
+-- duplicate entries. Trying to use string list with anything but strings throws
+-- an exception.
+-- @type sl
sl.sl = class("sl")
--- Initialize string list [sl:new()]
end
end
---- Remove *all* matching entries from the string list.
+--- Remove matching entry from string list.
-- @param entry The entry.
-- @return True when one or more entries were removed, false otherwise.
function sl.sl:remove(entry)
return unpack(self:totable())
end
+--- @section end
+
return strict.lock(sl)
-- vim:sw=4:sts=4:et:
local source_types = {}
--- Source base class.
+-- @type basic_source
source.basic_source = class("basic_source")
--- Source base constructor. Assert error on invalid input.
self._type, self._name))
end
+--- @section end
+
--- Dictionary holding all source objects indexed by their name.
source.sources = {}