]> git.e2factory.org Git - e2factory.git/commitdiff
hardlink result files to temporary directory for packing if possible
authorGordon Hecker <gh@emlix.com>
Thu, 1 Oct 2009 12:55:51 +0000 (14:55 +0200)
committerGordon Hecker <gh@emlix.com>
Fri, 2 Oct 2009 10:40:08 +0000 (12:40 +0200)
Signed-off-by: Gordon Hecker <gh@emlix.com>
local/e2build.lua

index b8034a0d1d26804b7e318c18bcb1aac6723a7d40..f7304c510e5efb24937dc662bc2ddf24d611e522 100644 (file)
@@ -711,9 +711,15 @@ function e2build.store_result(info, r, return_flags)
     e2lib.logf(3, "result file: %s", f)
     local s = string.format("%s/%s", rfilesdir, f)
     local d = "result/files"
-    rc, re = e2lib.cp(s, d)
+    rc, re = e2lib.ln(s, d)
     if not rc then
-      return false, e:cat(re)
+      e:cat(re)
+      e2lib.warnf("WOTHER",
+                       "Creating hardlink failed. Falling back to copying.")
+      rc, re = e2lib.cp(s, d)
+      if not rc then
+       return false, e:cat(re)
+      end
     end
   end
   rc, re = e2lib.chdir("result")