From 8e79a5f04eaf20c5313bbaf7a2248cb5d041948a Mon Sep 17 00:00:00 2001 From: Gordon Hecker Date: Fri, 15 Jan 2010 17:13:00 +0100 Subject: [PATCH] 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 --- global/e2-create-project.lua.in | 4 +--- global/e2-fetch-project.lua.in | 7 ++----- global/e2-install-e2.lua.in | 4 +--- 3 files changed, 4 insertions(+), 11 deletions(-) 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 -- 2.39.5