]> git.e2factory.org Git - e2factory.git/commitdiff
Read/write global_interface_version_file from an absolute path
authorTobias Ulmer <tu@emlix.com>
Wed, 4 Dec 2013 14:52:44 +0000 (15:52 +0100)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:17 +0000 (15:41 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
global/e2-fetch-project.lua
global/e2-install-e2.lua
local/e2tool.lua

index dc0e4974c9224a4d7de7942b714cc9179c99e337..8f89971a6990aa04f7986e242a2bc43bb58a0565 100644 (file)
@@ -203,8 +203,8 @@ local function e2_fetch_project(arg)
     end
 
     -- write version file
-    rc, re = eio.file_write(e2lib.globals.global_interface_version_file,
-        string.format("%d\n", v))
+    local givf = e2lib.join(p.destdir, e2lib.globals.global_interface_version_file)
+    rc, re = eio.file_write(givf, string.format("%d\n", v))
     if not rc then
         return false, e:cat(re)
     end
index 301dd9357f3a00f4d235eb3237c0ec4772c7f35e..69ebbc0a4f674eccece41c7cd342b9acc71adb06 100644 (file)
@@ -91,8 +91,8 @@ local function e2_install_e2(arg)
     end
 
     -- read the version from the first line
-    local line, re = eio.file_read_line(
-        e2lib.globals.global_interface_version_file)
+    local givf = e2lib.join(root, e2lib.globals.global_interface_version_file)
+    local line, re = eio.file_read_line(givf)
     if not line then
         return false, e:cat(re)
     end
index a72c97a93f886b09446929f2da918b25ea5c2040..eeba83b6962fd622ae2c4ad4ab7b2f4710797f42 100644 (file)
@@ -1445,7 +1445,8 @@ function e2tool.collect_project_info(info, skip_load_config)
 
     -- read global interface version and check if this version of the local
     -- tools supports the version used for the project
-    local line, re = eio.file_read_line(e2lib.globals.global_interface_version_file)
+    local givf = e2lib.join(info.root, e2lib.globals.global_interface_version_file)
+    local line, re = eio.file_read_line(givf)
     if not line then
         return false, e:cat(re)
     end