From fb7e7d1f84a49a3e954bc817b8932532106b122d Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Wed, 4 Dec 2013 15:52:44 +0100 Subject: [PATCH] Read/write global_interface_version_file from an absolute path Signed-off-by: Tobias Ulmer --- global/e2-fetch-project.lua | 4 ++-- global/e2-install-e2.lua | 4 ++-- local/e2tool.lua | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/global/e2-fetch-project.lua b/global/e2-fetch-project.lua index dc0e497..8f89971 100644 --- a/global/e2-fetch-project.lua +++ b/global/e2-fetch-project.lua @@ -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 diff --git a/global/e2-install-e2.lua b/global/e2-install-e2.lua index 301dd93..69ebbc0 100644 --- a/global/e2-install-e2.lua +++ b/global/e2-install-e2.lua @@ -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 diff --git a/local/e2tool.lua b/local/e2tool.lua index a72c97a..eeba83b 100644 --- a/local/e2tool.lua +++ b/local/e2tool.lua @@ -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 -- 2.39.5