From: Tobias Ulmer Date: Wed, 4 Dec 2013 14:52:44 +0000 (+0100) Subject: Read/write global_interface_version_file from an absolute path X-Git-Tag: e2factory-2.3.15rc1~305 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=fb7e7d1f84a49a3e954bc817b8932532106b122d;p=e2factory.git Read/write global_interface_version_file from an absolute path Signed-off-by: Tobias Ulmer --- 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