From: Gordon Hecker Date: Fri, 30 Oct 2009 11:12:44 +0000 (+0100) Subject: files sources: remove unused function: files.get_revision_id() X-Git-Tag: e2factory-2.3.2rc1~12 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=f0b2889b4ed1bb3bd7ab7d154538d247649f1e5b;p=e2factory.git files sources: remove unused function: files.get_revision_id() Signed-off-by: Gordon Hecker --- diff --git a/local/files.lua b/local/files.lua index 4ced4c6..67fd97d 100644 --- a/local/files.lua +++ b/local/files.lua @@ -106,41 +106,6 @@ function files.validate_source(info, sourcename) return true, nil end -function files.get_revision_id(info, sourcename, sourceset) - local rc, e - rc, e = files.validate_source(info, sourcename) - if not rc then - return false, e - end - local function files_hash_iterator(files) - local i = nil - local function nextfile(f) - i = next(f, i) - return i and files[i].hash - end - return nextfile, files - end - local s = info.sources[sourcename] - if not s.fhash then - -- store hash for each file - for _,f in pairs(s.file) do - f.hash, e = e2tool.read_hash_file(info, f.server, f.checksum_file) - if not f.hash then - e2lib.log(3, string.format( - "hash file not available for %s:%s. Hashing on-the-fly", - f.server, f.location)) - f.hash, e = e2tool.hash_file(info, f.server, f.location) - end - if not f.hash then - e2lib.log(1, e) - e2lib.abort(string.format("fetching file %s:%s", f.server, f.location)) - end - end - s.fhash = e2lib.compute_hash(files_hash_iterator, s.file) - end - return s.fhash -end - --- cache files for a source -- @param info the info structure -- @param sourcename name of the source