From: Tobias Ulmer Date: Tue, 5 Feb 2013 17:41:50 +0000 (+0100) Subject: Remove warning when hardlinking fails X-Git-Tag: e2factory-2.3.13rc1~26 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=24795bc45dbf5418e5036f6d743a5450fed5c7b9;p=e2factory.git Remove warning when hardlinking fails Also remove bogus error catenation. Link failures will still be logged by the kernel, but they are harmless. Signed-off-by: Tobias Ulmer --- diff --git a/local/e2build.lua b/local/e2build.lua index b98be4d..54057bc 100644 --- a/local/e2build.lua +++ b/local/e2build.lua @@ -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)