From: Gordon Hecker Date: Wed, 20 Jan 2010 17:19:57 +0000 (+0100) Subject: cleanup: remove unused code X-Git-Tag: e2factory-2.3.4pre1~35 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=82b0dc6f1d54bb3510398557302604a1a6071924;p=e2factory.git cleanup: remove unused code Signed-off-by: Gordon Hecker --- diff --git a/local/e2tool.lua b/local/e2tool.lua index 24e0ae9..274ca1e 100644 --- a/local/e2tool.lua +++ b/local/e2tool.lua @@ -898,15 +898,6 @@ function e2tool.dsort(info) return e2tool.dlist_recursive(info, info.default_results) end --- Retrieval of files information --- --- e2tool.expanded_files_list(INFO, SOURCE) --- --- For the given source of type file, calculate the absolute pathname of --- the file, expand directories to the files it contains. The resulting --- list is cached to INFO.sources.*.flist and returned, with the --- absolute filename as key and the value telling whether it is local. - function e2tool.read_hash_file(info, server, location) local e = new_error("error reading hash file") local cs = nil @@ -992,41 +983,6 @@ function e2tool.verify_hash(info, server, location, sha1) return true, nil end -function e2tool.expanded_files_list(info, source) - e2lib.log(4, "expanded_files_list: " .. source) - - local function add_to_files_list(info, flist, file) - e2lib.log(4, "add_to_files_list: " .. file.name) - local rserv, islocal = e2tool.lookup_server(info, file.server) - if not rserv then e2lib.abort("cannot resolve server: " .. file.server) end - local absol = rserv .. "/" .. file.name - local dir, base, ftyp = e2lib.splitpath(absol) - if not dir then - e2lib.abort(base .. ": " .. file.name) - end - if ftyp ~= "regular" then - e2lib.abort("is not a regular file: " .. file.name) - end - local t = {} - for k, v in pairs(file) do t[k] = v end - t.absol = absol - t.islocal = islocal - t.base = base - table.insert(flist, t) - end - local s = info.sources[source] - if s.flist then return s.flist end - if not s.file then return nil end - s.flist = {} - for _, t in ipairs(s.file) do - add_to_files_list(info, s.flist, t) - end - for _,f in pairs(s.flist) do - e2lib.log(4, "expanded_files_list: s.flist[x].absol: " .. f.absol) - end - return s.flist -end - function e2tool.projid(info) if info.projid then return info.projid diff --git a/local/lookup-server.lua b/local/lookup-server.lua deleted file mode 100755 index 19a8830..0000000 --- a/local/lookup-server.lua +++ /dev/null @@ -1,52 +0,0 @@ ---[[ - e2factory, the emlix embedded build system - - Copyright (C) 2007-2009 Gordon Hecker , emlix GmbH - Copyright (C) 2007-2009 Oskar Schirmer , emlix GmbH - Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH - - For more information have a look at http://www.e2factory.org - - e2factory is a registered trademark by emlix GmbH. - - This file is part of e2factory, the emlix embedded build system. - - e2factory is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -]] - --- lookup-server -*- Lua -*- - -require("e2local") -e2lib.init() - -e2option.documentation = [[ -usage: e2-lookup-server - -lookup the given server and print its absolute path -]] - -local opts = e2option.parse(arg) -if #opts.arguments ~= 1 then e2option.usage(1) end -local info, re = e2tool.collect_project_info() -if not info then - e2lib.abort(re) -end - -e2lib.log_invocation(info, arg) - -local server, islocal = e2tool.lookup_server(info, opts.arguments[1]) -if not server then e2options.usage(1) end -print(server) - -e2lib.finish()