]> git.e2factory.org Git - e2factory.git/commitdiff
optimization: use file_path() instead of fetch_file() when unpacking results
authorGordon Hecker <gh@emlix.com>
Fri, 5 Mar 2010 11:26:05 +0000 (12:26 +0100)
committerGordon Hecker <gh@emlix.com>
Mon, 3 May 2010 09:49:51 +0000 (11:49 +0200)
local/e2build.lua

index e33ab872d2c739dbdcb794c59aef07fd01c6a825..992ef5331b68f2a21e3fc8253e94715bd4c0b077 100644 (file)
@@ -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