end
self._chrootgroupid = hash.hash_finish(hc)
+ e2lib.logf(4, "BUILDID: name=%q chrootgroupid=%s",
+ self._name, self._chrootgroupid)
return self._chrootgroupid
end
--- @section end
hce.use = os.time()
+ if not hce.logged then
+ e2lib.logf(4, "BUILDID: file %q cached SHA1=%s SHA256=%s", filename,
+ tostring(hce.sha1), tostring(hce.sha256))
+ hce.logged = true
+ end
+
return cs
end
sha256 = checksum
end
+ e2lib.logf(4, "BUILDID: file %q SHA1=%s SHA256=%s", filename,
+ tostring(sha1), tostring(sha256))
+
if not e2lib.exists(filename, false) then
return
end
dev = sb.dev,
ino = sb.ino,
use = 0,
+ logged = true, -- limit buildid logging to once per file
}
end
-- @return FileID string: hash value, or false on error.
-- @return an error object on failure
function e2tool.file_class:fileid()
- local rc, re, e, hc, cs
+ local rc, re, e, hc, cs, fid
local cs_done = false
e = err.new("error calculating file id for file: %s", self:servloc())
hash.hash_append(hc, self._copy)
end
- return hash.hash_finish(hc)
+ fid = hash.hash_finish(hc)
+ e2lib.logf(4, "BUILDID: %s fileid=%s", self:servloc(), fid)
+ return fid
end
--- Verify file addressed by server name and location matches configured
local hash = require("hash")
local strict = require("strict")
+-- Sequential ID for debugging.
+-- Keeps track of various env tables between runs.
+local environment_seqid = 1
+
--- create new environment
-- @return environment
function environment.new()
local env = {}
local meta = { __index = environment }
setmetatable(env, meta)
+ env.seqid = environment_seqid
+ environment_seqid = environment_seqid + 1
env.dict = {}
env.sorted = {}
return env
function environment.envid(env)
assertIsTable(env)
assertIsTable(env.sorted)
+ local eid
local hc = hash.hash_start()
for var, val in env:iter() do
hash.hash_append(hc, var..val)
end
- return hash.hash_finish(hc)
+ eid = hash.hash_finish(hc)
+ e2lib.logf(4, "BUILDID: seqid=%d envid=%s", env.seqid, eid)
+ return eid
end
--- merge environment from merge into env.
return false, e:cat(re)
end
+ e2lib.logf(4, "BUILDID: name=%s licenceid=%s", self._name, self._licenceid)
+
return self._licenceid
end
--- @section end
newbuildid = "scratch-" .. newbuildid
buildid_scratch_cache[buildid] = newbuildid
+ e2lib.logf(4, "BUILDID: buildid=%s buildid_scratch=%s", buildid, newbuildid)
+
return buildid_scratch_cache[buildid]
end
end
_projid_cache = hash.hash_finish(hc)
+ e2lib.logf(4, "BUILDID: projid=%s", _projid_cache)
return _projid_cache
end
self._buildid = hash.hash_finish(hc)
+ e2lib.logf(4, "BUILDID: result=%s buildid=%s", self._name, self._buildid)
+
return build_mode.buildid(self._buildid)
end
assertIsStringN(bid)
+ e2lib.logf(4, "BUILDID: cp result=%s buildid=%s", self._name, bid)
+
return bid
end
self._sourceids[sourceset] = hash.hash_finish(hc)
+ e2lib.logf(4, "BUILDID: source=%s sourceset=%s sourceid=%s",
+ self._name, sourceset, self._sourceids[sourceset])
+
return self._sourceids[sourceset]
end
self._sourceid = hash.hash_finish(hc)
+ e2lib.logf(4, "BUILDID: source=%s sourceid=%s", self._name, self._sourceid)
+
return self._sourceid
end
self._commitids[sourceset] = id
self._sourceids[sourceset] = hash.hash_finish(hc)
+ e2lib.logf(4, "BUILDID: source=%s sourceset=%s sourceid=%s",
+ self._name, sourceset, self._sourceids[sourceset])
+
return self._sourceids[sourceset]
end
hash.hash_append(hc, out)
self._sourceids[sourceset] = hash.hash_finish(hc)
+
+ e2lib.logf(4, "BUILDID: source=%s sourceset=%s sourceid=%s",
+ self._name, sourceset, self._sourceids[sourceset])
+
return self._sourceids[sourceset]
end
self._sourceid = hash.hash_finish(hc)
+ e2lib.logf(4, "BUILDID: source=%s sourceid=%s", self._name, self._sourceid)
+
return self._sourceid
end
self._sourceids[sourceset] = hash.hash_finish(hc)
+ e2lib.logf(4, "BUILDID: source=%s sourceset=%s sourceid=%s",
+ self._name, sourceset, self._sourceids[sourceset])
+
return self._sourceids[sourceset]
end