]> git.e2factory.org Git - e2factory.git/commitdiff
files sources: remove unused function: files.get_revision_id()
authorGordon Hecker <gh@emlix.com>
Fri, 30 Oct 2009 11:12:44 +0000 (12:12 +0100)
committerGordon Hecker <gh@emlix.com>
Mon, 2 Nov 2009 12:44:22 +0000 (13:44 +0100)
Signed-off-by: Gordon Hecker <gh@emlix.com>
local/files.lua

index 4ced4c69d89446361efa08e6a12a39f6f2aeb489..67fd97da6ddd95375382101cc8994e04e0b29714 100644 (file)
@@ -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