]> git.e2factory.org Git - e2factory.git/commitdiff
Remove warning when hardlinking fails
authorTobias Ulmer <tu@emlix.com>
Tue, 5 Feb 2013 17:41:50 +0000 (18:41 +0100)
committerTobias Ulmer <tu@emlix.com>
Tue, 26 Feb 2013 18:07:15 +0000 (19:07 +0100)
Also remove bogus error catenation. Link failures will still be logged
by the kernel, but they are harmless.

Signed-off-by: Tobias Ulmer <tu@emlix.com>
local/e2build.lua

index b98be4dadedff14e4e78ab714bbf34a79dc84032..54057bcb4345e5ad0f6b92fc37a6caeb96ca2f15 100644 (file)
@@ -868,9 +868,14 @@ local function store_result(info, r, return_flags)
         local d = "result/files"
         rc, re = e2lib.ln(s, d)
         if not rc then
-            e:cat(re)
-            e2lib.warnf("WOTHER",
-            "Creating hardlink failed. Falling back to copying.")
+            -- There are three reasons this might fail
+            -- a) Legitimate IO etc. errors.
+            -- b) Source and destination are not on the same filesystem.
+            -- c) The file being linked to is owned by root, but the process is
+            --    not root. It would be nice to fix this case by changing
+            --    ownership of the source before copying, since this security
+            --    feature (of recentish Linux) basically makes the optimization
+            --    moot.
             rc, re = e2lib.cp(s, d)
             if not rc then
                 return false, e:cat(re)