]> git.e2factory.org Git - e2factory.git/commitdiff
cache: rename root_server to dot
authorTobias Ulmer <tu@emlix.com>
Tue, 20 Sep 2016 14:55:08 +0000 (16:55 +0200)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:18 +0000 (15:41 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/cache.lua
local/chroot.lua
local/e2-new-source.lua
local/e2build.lua
local/licence.lua
local/policy.lua
local/project.lua
local/result.lua
plugins/collect_project.lua
plugins/files.lua

index 0fa501022984cf47d9791f09396b46a35f7e47a9..5300204c4108c1f52176bbcdcb28debde6bdaa94 100644 (file)
@@ -128,7 +128,7 @@ function cache.setup_cache_local(c, project_root, project_location)
 
     servers = cache.server_names()
 
-    rc, re = cache.new_cache_entry(c, servers.root_server,
+    rc, re = cache.new_cache_entry(c, servers.dot,
         "file://" .. project_root, { writeback=true },  nil, nil)
     if not rc then
         return false, re
@@ -147,8 +147,7 @@ function cache.setup_cache_local(c, project_root, project_location)
 end
 
 local _server_names = strict.lock({
-    -- XXX: inconsistent, confusing naming scheme
-    root_server = ".",
+    dot = ".",
     -- the proj_storage server is equivalent to
     --  projects:info.project-locaton
     proj_storage = "proj-storage",
index 98a55e3dd5e6a96621d7df3a083346037f686473..5659f4ea2a45413714fc2d097820ca10b6e83b22 100644 (file)
@@ -291,7 +291,7 @@ function chroot.load_chroot_config(info)
                 return false, e
             end
 
-            if f.server ~= cache.server_names().root_server and not f.sha1 then
+            if f.server ~= cache.server_names().dot and not f.sha1 then
                 e:append("in group: %s", grp.name)
                 e:append("file entry for remote file without `sha1` attribute")
                 return false, e
index b131b8e1e812dfd07434fce0d2e06e7b44512352..7df853772914af186683f4851fa46656d81b3fa0 100644 (file)
@@ -256,7 +256,7 @@ local function e2_new_source(arg)
         local name = arguments[1]
         local rlocation = string.format("%s/git/%s.git", info.project_location, name)
         -- local
-        local lserver = cache.server_names().root_server
+        local lserver = cache.server_names().dot
         local llocation = string.format("in/%s/.git", name)
         local rc, re = generic_git.new_repository(info.cache, lserver, llocation,
             rserver, rlocation)
index c5f668abad68263d3a6eb95d17eab13f1fada7ce..b8e98c9b2c77bf79c5547ba2c58f65c7ac8f28e1 100644 (file)
@@ -411,7 +411,7 @@ function e2build.build_process_class:_install_build_script(res, return_flags)
     destdir = e2lib.join(bc.T, "script")
     info = e2tool.info()
 
-    rc, re = cache.fetch_file(info.cache, cache.server_names().root_server,
+    rc, re = cache.fetch_file(info.cache, cache.server_names().dot,
         location, destdir)
     if not rc then
         e = err.new("installing build script")
@@ -461,7 +461,7 @@ function e2build.build_process_class:_install_init_files(res, return_flags)
             end
 
             rc, re = cache.fetch_file(info.cache,
-                cache.server_names().root_server, location, destdir)
+                cache.server_names().dot, location, destdir)
             if not rc then
                 return false, e:cat(re)
             end
index 7e57ae8bf495b088ac75622511f961518220e06f..ea8544ccda26e0d0e3331617e21e4cc72ee7e4e7 100644 (file)
@@ -245,7 +245,7 @@ function licence.load_licence_config(info)
             if not rc then
                 return false, e:cat(re)
             end
-            if file.server ~= cache.server_names().root_server and not file.sha1 then
+            if file.server ~= cache.server_names().dot and not file.sha1 then
                 return false, e:append(
                     "file entry for remote file without sha1 attribute")
             end
index 4e0eac18ede8dbc3a05dcc4b0adb6668ee6cf334..9ead949aca9d23ad790df12399dc9acff1756208 100644 (file)
@@ -87,7 +87,7 @@ end
 -- @return Server name (string).
 -- @return Location path to store results in (string).
 local function storage_local(location, release_id)
-    return cache.server_names().root_server , string.format("out")
+    return cache.server_names().dot , string.format("out")
 end
 
 --- Get deploy server and location.
index bab28d6549df998e12af3a60089c1f99031b75a9..2aa2877fea835d19246ad84f7a9a698b0bbf4fab 100644 (file)
@@ -264,7 +264,7 @@ function project.projid(info)
         if not e2lib.is_backup_file(f) then
             location = e2lib.join("proj/init", f)
             file = {
-                server = cache.server_names().root_server,
+                server = cache.server_names().dot,
                 location = location,
             }
 
index 2a7d93d1cb188f5c6f98e05655be230ac0f02a7d..f07ebd1c32af13c2f0720f7c177d4dbe0043870f 100644 (file)
@@ -493,7 +493,7 @@ function result.result_class:buildid()
 
     -- buildscript
     local file = {
-        server = cache.server_names().root_server,
+        server = cache.server_names().dot,
         location = e2tool.resultbuildscript(self:get_name_as_path()),
     }
 
index 1fa3dad2ebeba23df0c252b0be35b2928b20e651..57f7c504c6a59207962ccdafcab6c7468e3b761d 100644 (file)
@@ -233,7 +233,7 @@ function collect_project_class:buildid()
 
     -- buildscript
     local file = {
-        server = cache.server_names().root_server,
+        server = cache.server_names().dot,
         location = e2tool.resultbuildscript(self:get_name_as_path()),
     }
 
@@ -420,7 +420,7 @@ function cp_build_process_class:_build_collect_project(res, return_flags)
         end
 
         e2lib.logf(3, "init file: %s", f)
-        local server = cache.server_names().root_server
+        local server = cache.server_names().dot
         local location = e2lib.join("proj/init", f)
         local cache_flags = {}
         rc, re = cache.fetch_file(info.cache, server, location,
@@ -540,7 +540,7 @@ function cp_build_process_class:_build_collect_project(res, return_flags)
             e2tool.resultbuildscript(dep:get_name_as_path())
         }
         for _,file in pairs(files) do
-            local server = cache.server_names().root_server
+            local server = cache.server_names().dot
             local cache_flags = {}
             rc, re = cache.fetch_file(info.cache, server, file, destdir,
                 nil, cache_flags)
@@ -611,7 +611,7 @@ function cp_build_process_class:_build_collect_project(res, return_flags)
         return false, e:cat(re)
     end
     -- install the global Makefiles
-    local server = cache.server_names().root_server
+    local server = cache.server_names().dot
     local destdir = e2lib.join(bc.T, "project")
     local cache_flags = {}
     local locations = {
index 5828f74c7ec0ee26e1b66fa41973f67608c99259..8fa1e297efed2c369708a60715ebb0fe9692bd85 100644 (file)
@@ -145,7 +145,7 @@ function files.files_source:initialize(rawsrc)
         if not f.location then
             error(e:append("file entry without `location' attribute"))
         end
-        if f.server ~= cache.server_names().root_server and not f.sha1 then
+        if f.server ~= cache.server_names().dot and not f.sha1 then
             error(e:append("file entry for remote file without "..
             "`sha1` attribute"))
         end