From 34d6927faac7ae47a479d9a150f0637d4d20fbc5 Mon Sep 17 00:00:00 2001 From: Gordon Hecker Date: Fri, 5 Mar 2010 12:26:05 +0100 Subject: [PATCH] optimization: use file_path() instead of fetch_file() when unpacking results --- local/e2build.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/local/e2build.lua b/local/e2build.lua index e33ab87..992ef53 100644 --- a/local/e2build.lua +++ b/local/e2build.lua @@ -457,9 +457,8 @@ function unpack_result(info, r, dep, destdir) local location1 = string.format("%s/%s/%s/result.tar", location, dep, dep_set) local cache_flags = {} - local rc, re = info.cache:fetch_file(server, location1, tmpdir, - nil, cache_flags) - if not rc then + local path, re = info.cache:file_path(server, location1, cache_flags) + if not path then return false, e:cat(re) end rc, re = e2lib.chdir(tmpdir) @@ -470,7 +469,7 @@ function unpack_result(info, r, dep, destdir) if not rc then return false, e:cat(re) end - rc, re = e2lib.tar("-xf result.tar -C result") + rc, re = e2lib.tar(string.format("-xf '%s' -C result", path)) if not rc then return false, e:cat(re) end -- 2.39.5