From: Gordon Hecker Date: Fri, 15 Jan 2010 16:13:00 +0000 (+0100) Subject: cache: fix global tools to comply with the new implementation of e2lib.setup_cache... X-Git-Tag: e2factory-2.3.4pre1~51 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=8e79a5f04eaf20c5313bbaf7a2248cb5d041948a;p=e2factory.git cache: fix global tools to comply with the new implementation of e2lib.setup_cache(). The global tools use the configured cache instead of a temporary one now. The cache is disabled on-the-fly now where caching is not appropriate. Signed-off-by: Gordon Hecker --- diff --git a/global/e2-create-project.lua.in b/global/e2-create-project.lua.in index a6cb563..52c3d55 100755 --- a/global/e2-create-project.lua.in +++ b/global/e2-create-project.lua.in @@ -50,9 +50,7 @@ local config, re = e2lib.get_global_config() if not config then e2lib.abort(e:cat(re)) end -local cachedir = e2lib.mktempdir() -local scache, re = e2lib.setup_cache("temporary cache", cachedir, - config.servers) +local scache, re = e2lib.setup_cache() if not scache then e2lib.abort(e:cat(re)) end diff --git a/global/e2-fetch-project.lua.in b/global/e2-fetch-project.lua.in index 63c9853..b70d1c1 100755 --- a/global/e2-fetch-project.lua.in +++ b/global/e2-fetch-project.lua.in @@ -54,9 +54,7 @@ e2lib.init2() local config = e2lib.get_global_config() -- setup cache -local cachedir = e2lib.mktempdir() -local scache, re = e2lib.setup_cache("temporary cache", cachedir, - config.servers) +local scache, re = e2lib.setup_cache() if not scache then e2lib.abort(e:cat(re)) end @@ -101,9 +99,8 @@ end -- fetch project descriptor file local tmpdir = e2lib.mktempdir() local location = string.format("%s/version", p.location) -local cache_flags = {} local rc, re = cache.fetch_file(scache, p.server, location, tmpdir, nil, - cache_flags) + { cache = false }) if not rc then e2lib.abort(e:cat(re)) end diff --git a/global/e2-install-e2.lua.in b/global/e2-install-e2.lua.in index f6e1aec..babcb24 100755 --- a/global/e2-install-e2.lua.in +++ b/global/e2-install-e2.lua.in @@ -54,9 +54,7 @@ if not servers then e2lib.abort("no servers configured in global config") end -local cachedir = e2lib.mktempdir() -local scache, re = e2lib.setup_cache("temporary cache", cachedir, - config.servers) +local scache, re = e2lib.setup_cache() if not scache then e2lib.abort(e:cat(re)) end